BlobContainerClientExtensions.DownloadToDirectoryAsync 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
DownloadToDirectoryAsync(BlobContainerClient, WaitUntil, String, BlobContainerClientTransferOptions, CancellationToken) |
Downloads the contents of a blob container. |
DownloadToDirectoryAsync(BlobContainerClient, WaitUntil, String, String, CancellationToken) |
Downloads the contents of a blob container. |
DownloadToDirectoryAsync(BlobContainerClient, WaitUntil, String, BlobContainerClientTransferOptions, CancellationToken)
Downloads the contents of a blob container.
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> DownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, Azure.WaitUntil waitUntil, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options, System.Threading.CancellationToken cancellationToken = default);
static member DownloadToDirectoryAsync : Azure.Storage.Blobs.BlobContainerClient * Azure.WaitUntil * string * Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation>
<Extension()>
Public Function DownloadToDirectoryAsync (client As BlobContainerClient, waitUntil As WaitUntil, localDirectoryPath As String, options As BlobContainerClientTransferOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TransferOperation)
Parameters
- client
- BlobContainerClient
The BlobContainerClient used for service operations.
- waitUntil
- WaitUntil
Indicates whether this invocation should wait until the transfer is complete to return or return immediately.
- localDirectoryPath
- String
The full path to the local directory where files will be dowloaded.
Options which control the container download.
- cancellationToken
- CancellationToken
Cancels starting the operation or if waitUntil
is set to Completed,
cancels waiting for the operation. Cancelling this token does not cancel the operation itself.
Returns
A TransferOperation instance which contains information about the transfer and its status.
Remarks
This is an async long-running operation which means the operation may not be complete when this methods returns. If waitUntil
is set to Started, the method will return as soon as a transfer is started and WaitForCompletionAsync(CancellationToken) can be used to wait for the transfer to complete. If waitUntil
is set to Completed, the method will wait for the entire transfer to complete. In either case, the caller must check the status of the transfer using the returned TransferOperation instance to determine if the transfer completed successfully or not. This method will not throw an exception if the transfer fails, but the Status will indicate a failure.
Applies to
DownloadToDirectoryAsync(BlobContainerClient, WaitUntil, String, String, CancellationToken)
Downloads the contents of a blob container.
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> DownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, Azure.WaitUntil waitUntil, string localDirectoryPath, string blobDirectoryPrefix = default, System.Threading.CancellationToken cancellationToken = default);
static member DownloadToDirectoryAsync : Azure.Storage.Blobs.BlobContainerClient * Azure.WaitUntil * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation>
<Extension()>
Public Function DownloadToDirectoryAsync (client As BlobContainerClient, waitUntil As WaitUntil, localDirectoryPath As String, Optional blobDirectoryPrefix As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TransferOperation)
Parameters
- client
- BlobContainerClient
The BlobContainerClient used for service operations.
- waitUntil
- WaitUntil
Indicates whether this invocation should wait until the transfer is complete to return or return immediately.
- localDirectoryPath
- String
The full path to the local directory where files will be dowloaded.
- blobDirectoryPrefix
- String
Optionally restricts the downloaded content to blobs with the specified directory prefix.
- cancellationToken
- CancellationToken
Cancels starting the operation or if waitUntil
is set to Completed,
cancels waiting for the operation. Cancelling this token does not cancel the operation itself.
Returns
A TransferOperation instance which contains information about the transfer and its status.
Remarks
This is an async long-running operation which means the operation may not be complete when this methods returns. If waitUntil
is set to Started, the method will return as soon as a transfer is started and WaitForCompletionAsync(CancellationToken) can be used to wait for the transfer to complete. If waitUntil
is set to Completed, the method will wait for the entire transfer to complete. In either case, the caller must check the status of the transfer using the returned TransferOperation instance to determine if the transfer completed successfully or not. This method will not throw an exception if the transfer fails, but the Status will indicate a failure.
Applies to
Azure SDK for .NET