다음을 통해 공유


VsShellUtilities.DownloadFileAsync Method

Definition

Caution

Use IFileSystem.DownloadFileAsync instead. This API will go away in 16.10.

Caution

Use IFileSystem.DownloadFileAsync instead

Downloads a remote file if it has not already been downloaded.

public:
 static System::Threading::Tasks::Task<Uri ^> ^ DownloadFileAsync(Uri ^ remoteUri, IProgress<Microsoft::VisualStudio::RpcContracts::FileSystem::OperationProgressData> ^ progress, System::Threading::CancellationToken cancellationToken);
[System.Obsolete("Use IFileSystem.DownloadFileAsync instead.  This API will go away in 16.10.")]
public static System.Threading.Tasks.Task<Uri> DownloadFileAsync (Uri remoteUri, IProgress<Microsoft.VisualStudio.RpcContracts.FileSystem.OperationProgressData>? progress, System.Threading.CancellationToken cancellationToken);
[System.Obsolete("Use IFileSystem.DownloadFileAsync instead", true)]
public static System.Threading.Tasks.Task<Uri> DownloadFileAsync (Uri remoteUri, IProgress<Microsoft.VisualStudio.RpcContracts.FileSystem.OperationProgressData>? progress, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("Use IFileSystem.DownloadFileAsync instead.  This API will go away in 16.10.")>]
static member DownloadFileAsync : Uri * IProgress<Microsoft.VisualStudio.RpcContracts.FileSystem.OperationProgressData> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
[<System.Obsolete("Use IFileSystem.DownloadFileAsync instead", true)>]
static member DownloadFileAsync : Uri * IProgress<Microsoft.VisualStudio.RpcContracts.FileSystem.OperationProgressData> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
Public Function DownloadFileAsync (remoteUri As Uri, progress As IProgress(Of OperationProgressData), cancellationToken As CancellationToken) As Task(Of Uri)

Parameters

remoteUri
Uri

The URI of the file to download.

progress
IProgress<OperationProgressData>

The interface through which progress is reported (optional).

cancellationToken
CancellationToken

The cancellation token.

Returns

The URI of the local file.

Attributes

Remarks

If the provider does not support IRemoteFileSystemProvider, remoteUri is returned.

Applies to