你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ShareFileClient.ClearRangeAsync Method

Definition

The ClearRangeAsync(HttpRange, ShareFileRequestConditions, CancellationToken) operation clears the range of a file.

For more information, see Put Range.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>> ClearRangeAsync(Azure.HttpRange range, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ClearRangeAsync : Azure.HttpRange * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>>
override this.ClearRangeAsync : Azure.HttpRange * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileUploadInfo>>
Public Overridable Function ClearRangeAsync (range As HttpRange, Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareFileUploadInfo))

Parameters

range
HttpRange

Specifies the range of bytes to be cleared. Both the start and end of the range must be specified.

conditions
ShareFileRequestConditions

Optional ShareFileRequestConditions to add conditions on creating the file.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the state of the file.

Remarks

A RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an AggregateException will be thrown, containing each failure instance.

Applies to