Class SshScpExtensions
File transfers with SCP (the server's scp program in sink or source mode). Uploads and downloads of single files, streams and
whole directories, with progress and cancellation. Names the server sends while downloading are checked: a file or directory name
must be a single path component, so nothing is ever written outside the target.
public static class SshScpExtensions
- Inheritance
-
SshScpExtensions
- Inherited Members
Methods
- DownloadAsync(SshClient, string, Stream, SshScpOptions?, CancellationToken)
Downloads the remote file
remotePathintodestination.
- DownloadDirectoryAsync(SshClient, string, string, SshScpOptions?, CancellationToken)
Downloads the remote directory
remotePathand everything in it (scp -r). As with scp, it becomeslocalDirectorywhen that does not exist, or a directory inside it when it does.
- DownloadFileAsync(SshClient, string, string, SshScpOptions?, CancellationToken)
Downloads the remote file
remotePathtolocalPath(a file, or an existing directory to put it in under the remote name).
- UploadAsync(SshClient, Stream, string, long?, SshScpOptions?, CancellationToken)
Uploads
lengthbytes ofsourceas the fileremotePath. The length is needed up front (SCP sends it before the data); a seekable stream's remaining length is used when it is null.
- UploadDirectoryAsync(SshClient, string, string, SshScpOptions?, CancellationToken)
Uploads the directory
localDirectoryand everything in it (scp -r). As with scp, it becomesremotePathwhen that does not exist, or a directory inside it when it does.
- UploadFileAsync(SshClient, string, string, SshScpOptions?, CancellationToken)
Uploads
localPathtoremotePath(a file, or an existing directory to put it in).