Begins an asynchronous uploading the steam into remote file.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
public IAsyncResult BeginUploadFile( Stream input, string path, bool canOverride, AsyncCallback asyncCallback, Object state, Action<ulong> uploadCallback = null )
Parameters
- input
- Type:
System.IO Stream
Data input stream.
- path
- Type:
System String
Remote file path.
- canOverride
- Type:
System Boolean
if set to true then existing file will be overwritten.
- 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.
- uploadCallback (Optional)
- Type:
System Action
UInt64
The upload callback.
Return Value
AnExceptions
| Exception | Condition |
|---|---|
| input | |
| path | |
| input is null. | |
| path is null or contains whitespace characters. | |
| Renci.SshNet.Common SshConnectionException | Client is not connected. |
| Renci.SshNet.Common SftpPermissionDeniedException | Permission to list the contents of the directory 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