Begins an asynchronous file downloading into the stream.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
public IAsyncResult BeginDownloadFile( string path, Stream output, AsyncCallback asyncCallback, Object state, Action<ulong> downloadCallback = null )
Parameters
- path
- Type:
System String
The path.
- output
- Type:
System.IO Stream
The output.
- asyncCallback
- Type:
System AsyncCallback
The method to be called when the asynchronous write operation is completed.
- state
- Type:
System Object
A user-provided object that distinguishes this particular asynchronous write request from other requests.
- downloadCallback (Optional)
- Type:
System Action
UInt64
The download callback.
Return Value
AnExceptions
| Exception | Condition |
|---|---|
| path | |
| output | |
| output is null. | |
| path is null or contains whitespace characters. | |
| Renci.SshNet.Common SshConnectionException | Client is not connected. |
| Renci.SshNet.Common SftpPermissionDeniedException | Permission to perform the operation was denied by the remote host. -or- A SSH command was denied by the server. |
| Renci.SshNet.Common SshException | A SSH error where |
Remarks
See Also