Method DownloadAsync
DownloadAsync(string, Stream, SftpTransferOptions?, CancellationToken)
Downloads remotePath into destination, with several reads in flight (the window, by default
64 reads of up to MaxReadLength), which is what makes SFTP fast on links with latency.
public Task<long> DownloadAsync(string remotePath, Stream destination, SftpTransferOptions? options = null, CancellationToken cancellationToken = default)
Parameters
remotePathstringdestinationStreamoptionsSftpTransferOptionscancellationTokenCancellationToken