SftpClient BeginUploadFile Method (Stream, String, Boolean, AsyncCallback, Object, Action UInt64 )SSH .NET Client Library Documentation
Begins an asynchronous uploading the steam into remote file.

Namespace: Renci.SshNet
Assembly: 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: OnlineSystem.IO Stream
Data input stream.
path
Type: OnlineSystem String
Remote file path.
canOverride
Type: OnlineSystem Boolean
if set to true then existing file will be overwritten.
asyncCallback
Type: OnlineSystem AsyncCallback
The method to be called when the asynchronous write operation is completed.
state
Type: OnlineSystem Object
A user-provided object that distinguishes this particular asynchronous write request from other requests.
uploadCallback (Optional)
Type: OnlineSystem Action OnlineUInt64 
The upload callback.

Return Value

An OnlineIAsyncResult that references the asynchronous operation.
Exceptions

Remarks

Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream.
See Also