Method DownloadDirectoryAsync
DownloadDirectoryAsync(SshClient, string, string, SshScpOptions?, CancellationToken)
Downloads the remote directory remotePath and everything in it (scp -r). As with scp, it becomes
localDirectory when that does not exist, or a directory inside it when it does.
public static Task DownloadDirectoryAsync(this SshClient client, string remotePath, string localDirectory, SshScpOptions? options = null, CancellationToken cancellationToken = default)
Parameters
clientSshClientremotePathstringlocalDirectorystringoptionsSshScpOptionscancellationTokenCancellationToken
Returns
Exceptions
- SshException
The transfer failed (TransferFailed).