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);

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