Share via


ShareFileClient.Download(ShareFileDownloadOptions, CancellationToken) Method

Definition

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

For more information, see Get File.

public virtual Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileDownloadInfo> Download (Azure.Storage.Files.Shares.Models.ShareFileDownloadOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Download : Azure.Storage.Files.Shares.Models.ShareFileDownloadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileDownloadInfo>
override this.Download : Azure.Storage.Files.Shares.Models.ShareFileDownloadOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileDownloadInfo>
Public Overridable Function Download (Optional options As ShareFileDownloadOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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