Language

DownloadedFile.SaveAsAsync(String, CancellationToken) Method

Definition

Write the already-buffered bytes to a local file path (no re-fetch, unlike SaveAsAsync(String, CancellationToken) which streams a fresh download).

public System.Threading.Tasks.Task SaveAsAsync(string path, System.Threading.CancellationToken cancellationToken = default);
member this.SaveAsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SaveAsAsync (path As String, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

path
String

Destination file path.

cancellationToken
CancellationToken

A token to cancel the write.

Returns

Applies to