Scp.GetFileAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Sftp.dll (version 7.0.9313)
GetFileAsync(String, String, Object)
Begins asynchronous GetFile operation. Downloads the remote file to the local file, overriding it if it already exists.
Declaration
public Task<long> GetFileAsync(string remotePath, string localPath, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | remotePath | The path of the remote file. |
| String | localPath | The path of the local file. This cannot be a directory. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<Int64> | Number of bytes transferred. |
GetFileAsync(String, Stream, Object)
Begins asynchronous GetFile operation. Downloads the remote file to the data stream.
Declaration
public Task<long> GetFileAsync(string remotePath, Stream outputStream, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | remotePath | The path of the remote file. |
| Stream | outputStream | The output stream. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<Int64> | Number of bytes transferred. |