Table of Contents

Method OpenWriteAsync

Namespace
SshSharp.Sftp
Assembly
SshSharp.dll

OpenWriteAsync(string, CancellationToken)

Creates or truncates a remote file for writing, as OpenAsync(string, FileMode, FileAccess, CancellationToken) with Create. Writes are written behind (see OpenAsync(string, FileMode, FileAccess, CancellationToken)): end with FlushAsync(CancellationToken) or dispose the stream asynchronously to see a failed write.

public Task<Stream> OpenWriteAsync(string path, CancellationToken cancellationToken = default)

Parameters

path string
cancellationToken CancellationToken

Returns

Task<Stream>