ShareDirectoryClient.ForceCloseHandleAsync(String, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ForceCloseHandle(String, CancellationToken) operation closes a handle opened on a directory
or a file at the service. It supports closing a single handle specified by handleId
.
This API is intended to be used alongside GetHandlesAsync(Nullable<Boolean>, CancellationToken) to force close handles that block operations, such as renaming a directory. 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 System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.CloseHandlesResult>> ForceCloseHandleAsync (string handleId, System.Threading.CancellationToken cancellationToken = default);
abstract member ForceCloseHandleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.CloseHandlesResult>>
override this.ForceCloseHandleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.CloseHandlesResult>>
Public Overridable Function ForceCloseHandleAsync (handleId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of CloseHandlesResult))
Parameters
- handleId
- String
Specifies the handle ID to be closed.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled.
Returns
A Response<T> describing the status of the ForceCloseHandleAsync(String, CancellationToken) operation.
Remarks
A RequestFailedException will be thrown if a failure occurs.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應