Method DownloadFileAsync
DownloadFileAsync(string, string, SftpTransferOptions?, CancellationToken)
Downloads remotePath to the local file localPath. With Overwrite
off, an existing local file is an error; with Preserve, the local file gets the remote one's
modification and access times, and its permissions where this system has Unix modes. A failed download leaves no partial file behind.
public Task<long> DownloadFileAsync(string remotePath, string localPath, SftpTransferOptions? options = null, CancellationToken cancellationToken = default)
Parameters
remotePathstringlocalPathstringoptionsSftpTransferOptionscancellationTokenCancellationToken