Sftp.DownloadAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Sftp.dll (version 7.0.9083)
DownloadAsync(String, String, TraversalMode, TransferMethod, ActionOnExistingFiles, Object)
Begins asynchronous Download operation. Downloads the specified file or directory hierarchy from the SFTP server to the local directory. Accepts wildcards.
Declaration
public Task DownloadAsync(string remotePath, string localDirectoryPath, TraversalMode traversalMode, TransferMethod transferMethod, ActionOnExistingFiles existingFileMode, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | remotePath | The path (with or without wildcards) of the remote file or directory. |
String | localDirectoryPath | The path of the local directory. This must be a directory. |
TraversalMode | traversalMode | Traversal mode. Specifies whether the whole hierarchy or files only are transferred. |
TransferMethod | transferMethod | Specifies whether to copy or move source items. |
ActionOnExistingFiles | existingFileMode | Specifies the default behavior for files that already exists at the local directory. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
Implements
DownloadAsync(FileSet, String, TransferMethod, ActionOnExistingFiles, Object)
Begins asynchronous Download operation. Downloads the specified files and/or directories from the SFTP server to the local directory.
Declaration
public Task DownloadAsync(FileSet set, string localDirectoryPath, TransferMethod transferMethod, ActionOnExistingFiles existingFileMode, object state = null)
Parameters
Type | Name | Description |
---|---|---|
FileSet | set | A filtering set which specifies remote files and directories to be downloaded. |
String | localDirectoryPath | The path of the local directory. This must be a directory. |
TransferMethod | transferMethod | Specifies whether to copy or move source items. |
ActionOnExistingFiles | existingFileMode | Specifies the default behavior for files that already exists at the local directory. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |