TransferManager.CopyAsync Method (Uri, CloudFile, Boolean, CopyOptions, SingleTransferContext, CancellationToken)
Copy file from an specified URI to an Azure file.
Namespace: Microsoft.WindowsAzure.Storage.DataMovement
Assembly: Microsoft.WindowsAzure.Storage.DataMovement (in Microsoft.WindowsAzure.Storage.DataMovement.dll)
Syntax
public static Task CopyAsync(
Uri sourceUri,
CloudFile destFile,
bool isServiceCopy,
CopyOptions options,
SingleTransferContext context,
CancellationToken cancellationToken
)
Parameters
sourceUri
Type: System.UriThe Uri of the source file.
destFile
Type: Microsoft.WindowsAzure.Storage.File.CloudFileThe CloudFile that is the destination Azure file.
isServiceCopy
Type: System.BooleanA flag indicating whether the copy is service-side asynchronous copy or not. If this flag is set to true, service-side asychronous copy will be used; if this flag is set to false, file is downloaded from source first, then uploaded to destination.
options
Type: Microsoft.WindowsAzure.Storage.DataMovement.CopyOptionsA CopyOptions object that specifies additional options for the operation.
context
Type: Microsoft.WindowsAzure.Storage.DataMovement.SingleTransferContextA SingleTransferContext object that represents the context for the current operation.
cancellationToken
Type: System.Threading.CancellationTokenA CancellationToken object to observe while waiting for a task to complete.
Return Value
Type: System.Threading.Tasks.Task
A Task object that represents the asynchronous operation.
Remarks
Copying from an URI to Azure file synchronously is not supported yet.
See Also
CopyAsync Overload
TransferManager Class
Microsoft.WindowsAzure.Storage.DataMovement Namespace
Return to top