SftpSession
Represents an SFTP session.
Gets the next request id for sftp session.
Gets the SFTP protocol version.
Gets the remote working directory.
public SftpSession(ISession session, int operationTimeout, Encoding encoding, ISftpResponseFactory sftpResponseFactory)
Initializes a new instance of the SftpSession class.
Performs SSH_FXP_CLOSE request.
Performs SSH_FXP_LSTAT request.
public SftpOpenAsyncResult BeginOpen(string path, Flags flags, AsyncCallback callback, object state)
Performs SSH_FXP_OPEN request.
public SftpReadAsyncResult BeginRead(byte[] handle, ulong offset, uint length, AsyncCallback callback, object state)
Begins an asynchronous read using a SSH_FXP_READ request.
Performs SSH_FXP_REALPATH request.
Performs SSH_FXP_STAT request.
Calculates the optimal size of the buffer to read data from the channel.
Calculates the optimal size of the buffer to write data on the channel.
Changes the current working directory to the specified path.
public ISftpFileReader CreateFileReader(byte[] handle, ISftpSession sftpSession, uint chunkSize, int maxPendingReads, long? fileSize)
Creates an ISftpFileReader for reading the content of the file represented by a given handle.
Handles the end of an asynchronous close.
Handles the end of an asynchronous SSH_FXP_LSTAT request.
Handles the end of an asynchronous open.
Handles the end of an asynchronous read.
Handles the end of an asynchronous SSH_FXP_REALPATH request.
Handles the end of an asynchronous stat.
Resolves a given path into an absolute path on the server.
Asynchronously resolves a given path into an absolute path on the server.
Performs SSH_FXP_CLOSE request.
Performs a SSH_FXP_CLOSE request.
Performs SSH_FXP_FSETSTAT request.
Performs SSH_FXP_FSTAT request.
public Task<SftpFileAttributes> RequestFStatAsync(byte[] handle, CancellationToken cancellationToken)
Asynchronously performs a SSH_FXP_FSTAT request.
Performs SSH_FXP_LSTAT request.
Performs SSH_FXP_MKDIR request.
Performs SSH_FXP_OPEN request.
Asynchronously performs a SSH_FXP_OPEN request.
Performs SSH_FXP_OPENDIR request.
Asynchronously performs a SSH_FXP_OPENDIR request.
Performs posix-rename@openssh.com extended request.
Performs SSH_FXP_READ request.
public Task<byte[]> RequestReadAsync(byte[] handle, ulong offset, uint length, CancellationToken cancellationToken)
Asynchronously performs a SSH_FXP_READ request.
Performs SSH_FXP_READDIR request.
public Task<KeyValuePair<string, SftpFileAttributes>[]> RequestReadDirAsync(byte[] handle, CancellationToken cancellationToken)
Performs a SSH_FXP_READDIR request.
Performs SSH_FXP_REMOVE request.
Asynchronously performs a SSH_FXP_REMOVE request.
Performs SSH_FXP_RENAME request.
Asynchronously performs a SSH_FXP_RENAME request.
Performs SSH_FXP_RMDIR request.
Performs SSH_FXP_SETSTAT request.
Performs SSH_FXP_STAT request.
Performs statvfs@openssh.com extended request.
public Task<SftpFileSytemInformation> RequestStatVfsAsync(string path, CancellationToken cancellationToken)
Asynchronously performs a statvfs@openssh.com extended request.
Performs SSH_FXP_SYMLINK request.
public void RequestWrite(byte[] handle, ulong serverOffset, byte[] data, int offset, int length, AutoResetEvent wait, Action<SftpStatusResponse> writeCompleted = null)
Performs SSH_FXP_WRITE request.
public Task RequestWriteAsync(byte[] handle, ulong serverOffset, byte[] data, int offset, int length, CancellationToken cancellationToken)
Asynchronouly performs a SSH_FXP_WRITE request.