<PackageReference Include="SSH.NET" Version="2020.0.2" />

ISftpSession

uint ProtocolVersion { get; }

Gets the SFTP protocol version.

string WorkingDirectory { get; }

Gets the remote working directory.

SftpCloseAsyncResult BeginClose(byte[] handle, AsyncCallback callback, object state)

Performs SSH_FXP_CLOSE request.

SFtpStatAsyncResult BeginLStat(string path, AsyncCallback callback, object state)

Performs SSH_FXP_LSTAT request.

SftpOpenAsyncResult BeginOpen(string path, Flags flags, AsyncCallback callback, object state)

Performs SSH_FXP_OPEN request

SftpReadAsyncResult BeginRead(byte[] handle, ulong offset, uint length, AsyncCallback callback, object state)

Begins an asynchronous read using a SSH_FXP_READ request.

SftpRealPathAsyncResult BeginRealPath(string path, AsyncCallback callback, object state)

Performs SSH_FXP_REALPATH request.

SFtpStatAsyncResult BeginStat(string path, AsyncCallback callback, object state)

Performs SSH_FXP_STAT request

uint CalculateOptimalReadLength(uint bufferSize)

Calculates the optimal size of the buffer to read data from the channel.

uint CalculateOptimalWriteLength(uint bufferSize, byte[] handle)

Calculates the optimal size of the buffer to write data on the channel.

void ChangeDirectory(string path)

Changes the current working directory to the specified path.

ISftpFileReader CreateFileReader(byte[] handle, ISftpSession sftpSession, uint chunkSize, int maxPendingReads, long? fileSize)

void EndClose(SftpCloseAsyncResult asyncResult)

Handles the end of an asynchronous close.

Handles the end of an asynchronous SSH_FXP_LSTAT request.

byte[] EndOpen(SftpOpenAsyncResult asyncResult)

Handles the end of an asynchronous read.

byte[] EndRead(SftpReadAsyncResult asyncResult)

Handles the end of an asynchronous read.

Handles the end of an asynchronous SSH_FXP_REALPATH request.

Handles the end of an asynchronous read.

string GetCanonicalPath(string path)

Resolves a given path into an absolute path on the server.

void RequestClose(byte[] handle)

Performs SSH_FXP_CLOSE request.

void RequestFSetStat(byte[] handle, SftpFileAttributes attributes)

Performs SSH_FXP_FSETSTAT request.

SftpFileAttributes RequestFStat(byte[] handle, bool nullOnError)

Performs SSH_FXP_FSTAT request.

Performs SSH_FXP_LSTAT request.

void RequestMkDir(string path)

Performs SSH_FXP_MKDIR request.

byte[] RequestOpen(string path, Flags flags, bool nullOnError = false)

Performs SSH_FXP_OPEN request

byte[] RequestOpenDir(string path, bool nullOnError = false)

Performs SSH_FXP_OPENDIR request

void RequestPosixRename(string oldPath, string newPath)

Performs posix-rename@openssh.com extended request.

byte[] RequestRead(byte[] handle, ulong offset, uint length)

Performs SSH_FXP_READ request.

Performs SSH_FXP_READDIR request

void RequestRemove(string path)

Performs SSH_FXP_REMOVE request.

void RequestRename(string oldPath, string newPath)

Performs SSH_FXP_RENAME request.

void RequestRmDir(string path)

Performs SSH_FXP_RMDIR request.

void RequestSetStat(string path, SftpFileAttributes attributes)

Performs SSH_FXP_SETSTAT request.

SftpFileAttributes RequestStat(string path, bool nullOnError = false)

Performs SSH_FXP_STAT request.

SftpFileSytemInformation RequestStatVfs(string path, bool nullOnError = false)

Performs statvfs@openssh.com extended request.

void RequestSymLink(string linkpath, string targetpath)

Performs SSH_FXP_SYMLINK request.

void RequestWrite(byte[] handle, ulong serverOffset, byte[] data, int offset, int length, AutoResetEvent wait, Action<SftpStatusResponse> writeCompleted = null)

Performs SSH_FXP_WRITE request.