C# 클래스 Renci.SshNet.Sftp.SftpSession

상속: SubsystemSession, ISftpSession
파일 보기 프로젝트 열기: sshnet/SSH.NET 1 사용 예제들

공개 메소드들

메소드 설명
CalculateOptimalReadLength ( uint bufferSize ) : uint

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

CalculateOptimalWriteLength ( uint bufferSize, byte handle ) : uint

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

Currently, we do not take the remote window size into account.

ChangeDirectory ( string path ) : void

Changes the current working directory to the specified path.

GetCanonicalPath ( string path ) : string

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

RequestClose ( byte handle ) : void

Performs SSH_FXP_CLOSE request.

RequestFSetStat ( byte handle, SftpFileAttributes attributes ) : void

Performs SSH_FXP_FSETSTAT request.

RequestFStat ( byte handle ) : SftpFileAttributes

Performs SSH_FXP_FSTAT request.

RequestLStat ( string path ) : SftpFileAttributes

Performs SSH_FXP_LSTAT request.

RequestMkDir ( string path ) : void

Performs SSH_FXP_MKDIR request.

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

Performs SSH_FXP_OPEN request

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

Performs SSH_FXP_OPENDIR request

RequestPosixRename ( string oldPath, string newPath ) : void

Performs [email protected] extended request.

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

Performs SSH_FXP_READ request.

RequestReadDir ( byte handle ) : SftpFileAttributes>[].KeyValuePair

Performs SSH_FXP_READDIR request

RequestRemove ( string path ) : void

Performs SSH_FXP_REMOVE request.

RequestRename ( string oldPath, string newPath ) : void

Performs SSH_FXP_RENAME request.

RequestRmDir ( string path ) : void

Performs SSH_FXP_RMDIR request.

RequestSetStat ( string path, SftpFileAttributes attributes ) : void

Performs SSH_FXP_SETSTAT request.

RequestStatVfs ( string path, bool nullOnError = false ) : SftpFileSytemInformation

Performs [email protected] extended request.

RequestSymLink ( string linkpath, string targetpath ) : void

Performs SSH_FXP_SYMLINK request.

RequestWrite ( byte handle, ulong serverOffset, byte data, int offset, int length, AutoResetEvent wait, Action writeCompleted = null ) : void

Performs SSH_FXP_WRITE request.

SftpSession ( ISession session, System.TimeSpan operationTimeout, Encoding encoding ) : System

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
OnChannelOpen ( ) : void
OnDataReceived ( byte data ) : void

비공개 메소드들

메소드 설명
GetFullRemotePath ( string path ) : string
GetSftpException ( SftpStatusResponse response ) : SshException
HandleResponse ( SftpResponse response ) : void
HardLink ( string oldPath, string newPath ) : void

Performs [email protected] extended request.

RequestFStatVfs ( byte handle, bool nullOnError = false ) : SftpFileSytemInformation

Performs [email protected] extended request.

RequestReadLink ( string path, bool nullOnError = false ) : SftpFileAttributes>[].KeyValuePair

Performs SSH_FXP_READLINK request.

RequestRealPath ( string path, bool nullOnError = false ) : SftpFileAttributes>[].KeyValuePair

Performs SSH_FXP_REALPATH request

RequestStat ( string path, bool nullOnError = false ) : SftpFileAttributes

Performs SSH_FXP_STAT request.

SendMessage ( SftpMessage sftpMessage ) : void
SendRequest ( SftpRequest request ) : void
TryLoadSftpMessage ( byte packetData, int offset, int count ) : bool

메소드 상세

CalculateOptimalReadLength() 공개 메소드

Calculates the optimal size of the buffer to read data from the channel.
public CalculateOptimalReadLength ( uint bufferSize ) : uint
bufferSize uint The buffer size configured on the client.
리턴 uint

CalculateOptimalWriteLength() 공개 메소드

Calculates the optimal size of the buffer to write data on the channel.
Currently, we do not take the remote window size into account.
public CalculateOptimalWriteLength ( uint bufferSize, byte handle ) : uint
bufferSize uint The buffer size configured on the client.
handle byte The file handle.
리턴 uint

ChangeDirectory() 공개 메소드

Changes the current working directory to the specified path.
public ChangeDirectory ( string path ) : void
path string The new working directory.
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

GetCanonicalPath() 공개 메소드

Resolves a given path into an absolute path on the server.
public GetCanonicalPath ( string path ) : string
path string The path to resolve.
리턴 string

OnChannelOpen() 보호된 메소드

protected OnChannelOpen ( ) : void
리턴 void

OnDataReceived() 보호된 메소드

protected OnDataReceived ( byte data ) : void
data byte
리턴 void

RequestClose() 공개 메소드

Performs SSH_FXP_CLOSE request.
public RequestClose ( byte handle ) : void
handle byte The handle.
리턴 void

RequestFSetStat() 공개 메소드

Performs SSH_FXP_FSETSTAT request.
public RequestFSetStat ( byte handle, SftpFileAttributes attributes ) : void
handle byte The handle.
attributes SftpFileAttributes The attributes.
리턴 void

RequestFStat() 공개 메소드

Performs SSH_FXP_FSTAT request.
public RequestFStat ( byte handle ) : SftpFileAttributes
handle byte The handle.
리턴 SftpFileAttributes

RequestLStat() 공개 메소드

Performs SSH_FXP_LSTAT request.
public RequestLStat ( string path ) : SftpFileAttributes
path string The path.
리턴 SftpFileAttributes

RequestMkDir() 공개 메소드

Performs SSH_FXP_MKDIR request.
public RequestMkDir ( string path ) : void
path string The path.
리턴 void

RequestOpen() 공개 메소드

Performs SSH_FXP_OPEN request
public RequestOpen ( string path, Flags flags, bool nullOnError = false ) : byte[]
path string The path.
flags System.Flags The flags.
nullOnError bool if set to true returns null instead of throwing an exception.
리턴 byte[]

RequestOpenDir() 공개 메소드

Performs SSH_FXP_OPENDIR request
public RequestOpenDir ( string path, bool nullOnError = false ) : byte[]
path string The path.
nullOnError bool if set to true returns null instead of throwing an exception.
리턴 byte[]

RequestPosixRename() 공개 메소드

Performs [email protected] extended request.
public RequestPosixRename ( string oldPath, string newPath ) : void
oldPath string The old path.
newPath string The new path.
리턴 void

RequestRead() 공개 메소드

Performs SSH_FXP_READ request.
public RequestRead ( byte handle, ulong offset, uint length ) : byte[]
handle byte The handle.
offset ulong The offset.
length uint The length.
리턴 byte[]

RequestReadDir() 공개 메소드

Performs SSH_FXP_READDIR request
public RequestReadDir ( byte handle ) : SftpFileAttributes>[].KeyValuePair
handle byte The handle.
리턴 SftpFileAttributes>[].KeyValuePair

RequestRemove() 공개 메소드

Performs SSH_FXP_REMOVE request.
public RequestRemove ( string path ) : void
path string The path.
리턴 void

RequestRename() 공개 메소드

Performs SSH_FXP_RENAME request.
public RequestRename ( string oldPath, string newPath ) : void
oldPath string The old path.
newPath string The new path.
리턴 void

RequestRmDir() 공개 메소드

Performs SSH_FXP_RMDIR request.
public RequestRmDir ( string path ) : void
path string The path.
리턴 void

RequestSetStat() 공개 메소드

Performs SSH_FXP_SETSTAT request.
public RequestSetStat ( string path, SftpFileAttributes attributes ) : void
path string The path.
attributes SftpFileAttributes The attributes.
리턴 void

RequestStatVfs() 공개 메소드

Performs [email protected] extended request.
public RequestStatVfs ( string path, bool nullOnError = false ) : SftpFileSytemInformation
path string The path.
nullOnError bool if set to true [null on error].
리턴 SftpFileSytemInformation

RequestSymLink() 공개 메소드

Performs SSH_FXP_SYMLINK request.
public RequestSymLink ( string linkpath, string targetpath ) : void
linkpath string The linkpath.
targetpath string The targetpath.
리턴 void

RequestWrite() 공개 메소드

Performs SSH_FXP_WRITE request.
public RequestWrite ( byte handle, ulong serverOffset, byte data, int offset, int length, AutoResetEvent wait, Action writeCompleted = null ) : void
handle byte The handle.
serverOffset ulong The the zero-based offset (in bytes) relative to the beginning of the file that the write must start at.
data byte The buffer holding the data to write.
offset int the zero-based offset in at which to begin taking bytes to write.
length int The length (in bytes) of the data to write.
wait System.Threading.AutoResetEvent The wait event handle if needed.
writeCompleted Action The callback to invoke when the write has completed.
리턴 void

SftpSession() 공개 메소드

public SftpSession ( ISession session, System.TimeSpan operationTimeout, Encoding encoding ) : System
session ISession
operationTimeout System.TimeSpan
encoding System.Text.Encoding
리턴 System