BlobBaseClient.DownloadToAsync Method

Definition

Overloads

DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

DownloadToAsync(Stream)

The DownloadToAsync(Stream) downloads a blob using parallel requests, and writes the content to destination.

DownloadToAsync(String)

The DownloadToAsync(String) downloads a blob using parallel requests, and writes the content to path.

DownloadToAsync(Stream, CancellationToken)

The DownloadToAsync(Stream, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

DownloadToAsync(String, CancellationToken)

The DownloadToAsync(String, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (System.IO.Stream destination, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = default, Azure.Storage.StorageTransferOptions transferOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadToAsync : System.IO.Stream * Azure.Storage.Blobs.Models.BlobRequestConditions * Azure.Storage.StorageTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : System.IO.Stream * Azure.Storage.Blobs.Models.BlobRequestConditions * Azure.Storage.StorageTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (destination As Stream, Optional conditions As BlobRequestConditions = Nothing, Optional transferOptions As StorageTransferOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

destination
Stream

A Stream to write the downloaded content to.

conditions
BlobRequestConditions

Optional BlobRequestConditions to add conditions on the creation of this new block blob.

transferOptions
StorageTransferOptions

Optional StorageTransferOptions to configure parallel transfer behavior.

cancellationToken
CancellationToken

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

Returns

Task<Response>

A Response describing the operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

DownloadToAsync(Stream)

The DownloadToAsync(Stream) downloads a blob using parallel requests, and writes the content to destination.

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (System.IO.Stream destination);
abstract member DownloadToAsync : System.IO.Stream -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : System.IO.Stream -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (destination As Stream) As Task(Of Response)

Parameters

destination
Stream

A Stream to write the downloaded content to.

Returns

Task<Response>

A Response describing the operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

DownloadToAsync(String)

The DownloadToAsync(String) downloads a blob using parallel requests, and writes the content to path.

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (string path);
abstract member DownloadToAsync : string -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : string -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (path As String) As Task(Of Response)

Parameters

path
String

A file path to write the downloaded content to.

Returns

Task<Response>

A Response describing the operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

DownloadToAsync(Stream, CancellationToken)

The DownloadToAsync(Stream, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (System.IO.Stream destination, System.Threading.CancellationToken cancellationToken);
abstract member DownloadToAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (destination As Stream, cancellationToken As CancellationToken) As Task(Of Response)

Parameters

destination
Stream

A Stream to write the downloaded content to.

cancellationToken
CancellationToken

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

Returns

Task<Response>

A Response describing the operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

DownloadToAsync(String, CancellationToken)

The DownloadToAsync(String, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (string path, System.Threading.CancellationToken cancellationToken);
abstract member DownloadToAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (path As String, cancellationToken As CancellationToken) As Task(Of Response)

Parameters

path
String

A file path to write the downloaded content to.

cancellationToken
CancellationToken

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

Returns

Task<Response>

A Response describing the operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (string path, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = default, Azure.Storage.StorageTransferOptions transferOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadToAsync : string * Azure.Storage.Blobs.Models.BlobRequestConditions * Azure.Storage.StorageTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadToAsync : string * Azure.Storage.Blobs.Models.BlobRequestConditions * Azure.Storage.StorageTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadToAsync (path As String, Optional conditions As BlobRequestConditions = Nothing, Optional transferOptions As StorageTransferOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

path
String

A file path to write the downloaded content to.

conditions
BlobRequestConditions

Optional BlobRequestConditions to add conditions on the creation of this new block blob.

transferOptions
StorageTransferOptions

Optional StorageTransferOptions to configure parallel transfer behavior.

cancellationToken
CancellationToken

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

Returns

Task<Response>

A Response describing the operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to