Method UploadDirectoryAsync
UploadDirectoryAsync(string, string, SftpTransferOptions?, CancellationToken)
Uploads the local directory localDirectory and everything under it to remoteDirectory (created
if needed), file by file with UploadFileAsync(string, string, SftpTransferOptions?, CancellationToken) and the same options. Symbolic links, junctions and
other reparse points are skipped, and so are special files on Unix (FIFOs, sockets, devices).
public Task<SftpTransferSummary> UploadDirectoryAsync(string localDirectory, string remoteDirectory, SftpTransferOptions? options = null, CancellationToken cancellationToken = default)
Parameters
localDirectorystringremoteDirectorystringoptionsSftpTransferOptionscancellationTokenCancellationToken
Returns
Exceptions
- DirectoryNotFoundException
localDirectorydoes not exist.