Table of Contents

Method UploadAsync

Namespace
SshSharp.Sftp
Assembly
SshSharp.dll

UploadAsync(Stream, string, SftpTransferOptions?, CancellationToken)

Uploads source (read to its end) to remotePath, with several writes in flight. The remote file is created or, with Overwrite, truncated.

public Task<long> UploadAsync(Stream source, string remotePath, SftpTransferOptions? options = null, CancellationToken cancellationToken = default)

Parameters

source Stream
remotePath string
options SftpTransferOptions
cancellationToken CancellationToken

Returns

Task<long>

The number of bytes uploaded.