ShareFileClient.DownloadAsync Method

Definition

The DownloadAsync(ShareFileDownloadOptions, CancellationToken) operation reads or downloads a file from the system, including its metadata and properties.

For more information, see Get File.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileDownloadInfo>> DownloadAsync (Azure.Storage.Files.Shares.Models.ShareFileDownloadOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadAsync : Azure.Storage.Files.Shares.Models.ShareFileDownloadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileDownloadInfo>>
override this.DownloadAsync : Azure.Storage.Files.Shares.Models.ShareFileDownloadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileDownloadInfo>>
Public Overridable Function DownloadAsync (Optional options As ShareFileDownloadOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareFileDownloadInfo))

Parameters

options
ShareFileDownloadOptions

Optional parameters.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the downloaded file. Content contains the file's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to