ContainerRegistryContentClient.DownloadBlobToAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DownloadBlobToAsync(String, Stream, CancellationToken) |
Download a blob to a passed-in destination stream. This approach will download the blob to the destination stream in sequential chunks of bytes. |
DownloadBlobToAsync(String, String, CancellationToken) |
Download a blob to a file specified by the path parameter. |
DownloadBlobToAsync(String, Stream, CancellationToken)
Download a blob to a passed-in destination stream. This approach will download the blob to the destination stream in sequential chunks of bytes.
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadBlobToAsync (string digest, System.IO.Stream destination, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadBlobToAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadBlobToAsync : string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadBlobToAsync (digest As String, destination As Stream, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- digest
- String
The digest of the blob to download.
- destination
- Stream
Destination for the downloaded blob.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
The raw response corresponding to the final GET blob chunk request.
Exceptions
If destination
is null.
Thrown when a failure is returned by the Container Registry service.
Applies to
DownloadBlobToAsync(String, String, CancellationToken)
Download a blob to a file specified by the path parameter.
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadBlobToAsync (string digest, string path, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadBlobToAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DownloadBlobToAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DownloadBlobToAsync (digest As String, path As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- digest
- String
The digest of the blob to download.
- path
- String
A file path to write the downloaded content to.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
The raw response corresponding to the final GET blob chunk request.
Exceptions
If path
is null.
Thrown when a failure is returned by the Container Registry service.
Applies to
Azure SDK for .NET