ShareFileClient.ForceCloseAllHandles(CancellationToken) Method

Definition

The ForceCloseAllHandles(CancellationToken) operation closes all handles opened on a file at the service.

This API is intended to be used alongside GetHandlesAsync(CancellationToken) to force close handles that block operations. These handles may have leaked or been lost track of by SMB clients. The API has client-side impact on the handle being closed, including user visible errors due to failed attempts to read or write files. This API is not intended for use as a replacement or alternative for SMB close.

For more information, see Force Close Handles.

public virtual Azure.Storage.Files.Shares.Models.CloseHandlesResult ForceCloseAllHandles (System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A CloseHandlesResult describing the status of the ForceCloseAllHandles(CancellationToken) operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

Prodotto Versioni
Azure SDK for .NET Latest, Preview