C# 클래스 Granados.Poderosa.SCP.SCPClient

SCP Client

This class is designed to be used in the worker thread.

Each method blocks thread while transmitting the files.

파일 보기 프로젝트 열기: poderosaproject/poderosa 1 사용 예제들

공개 메소드들

메소드 설명
Download ( string remotePath, string localPath, bool recursive, bool preserveTime, Granados.Poderosa.FileTransfer.Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : void

Download files or directories.

Unfortunately, Granados sends a command line in the ASCII encoding. So the "remotePath" must be an ASCII text.

SCPClient ( ISSHConnection connection ) : System

Constructor

Upload ( string localPath, string remotePath, bool recursive, bool preserveTime, Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : void

Upload files or directories.

Unfortunately, Granados sends a command line in the ASCII encoding. So the "remotePath" must be an ASCII text.

비공개 메소드들

메소드 설명
CheckResponse ( SCPChannelStream stream ) : void

Read a byte and check the status code.

CreateDirectory ( SCPChannelStream stream, string directoryPath, SCPModTime modTime, Granados.Poderosa.FileTransfer.Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : bool
CreateFile ( SCPChannelStream stream, string filePath, SCPEntry entry, SCPModTime modTime, Granados.Poderosa.FileTransfer.Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : bool
DeterminePathToCreate ( string localBasePath, string initialLocalPath, SCPEntry entry ) : string
EscapeUnixPath ( string path ) : string
GetPermissionsText ( bool isDirectory ) : string
IsAscii ( string s ) : bool
ParseEntry ( byte lineData ) : SCPEntry
ParseModTime ( byte lineData ) : SCPModTime
SendError ( SCPChannelStream stream, string message ) : void
SendModTime ( SCPChannelStream stream, DateTime mtime, DateTime atime ) : void
UploadDirectory ( string fullPath, SCPChannelStream stream, bool preserveTime, Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : bool
UploadFile ( string fullPath, SCPChannelStream stream, bool preserveTime, Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : bool

메소드 상세

Download() 공개 메소드

Download files or directories.

Unfortunately, Granados sends a command line in the ASCII encoding. So the "remotePath" must be an ASCII text.

public Download ( string remotePath, string localPath, bool recursive, bool preserveTime, Granados.Poderosa.FileTransfer.Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : void
remotePath string Remote path (Unix path)
localPath string Local path (Windows' path)
recursive bool Specifies recursive mode
preserveTime bool Specifies to preserve time of the directory or file.
cancellation Granados.Poderosa.FileTransfer.Cancellation An object to request the cancellation. Set null if the cancellation is not needed.
progressDelegate SCPFileTransferProgressDelegate Delegate to notify progress. Set null if notification is not needed.
리턴 void

SCPClient() 공개 메소드

Constructor
public SCPClient ( ISSHConnection connection ) : System
connection ISSHConnection SSH connection. Currently only SSH2 connection is accepted.
리턴 System

Upload() 공개 메소드

Upload files or directories.

Unfortunately, Granados sends a command line in the ASCII encoding. So the "remotePath" must be an ASCII text.

public Upload ( string localPath, string remotePath, bool recursive, bool preserveTime, Cancellation cancellation, SCPFileTransferProgressDelegate progressDelegate ) : void
localPath string Local path (Windows' path)
remotePath string Remote path (Unix path)
recursive bool Specifies recursive mode
preserveTime bool Specifies to preserve time of the directory or file.
cancellation Cancellation An object to request the cancellation. Set null if the cancellation is not needed.
progressDelegate SCPFileTransferProgressDelegate Delegate to notify progress. Set null if notification is not needed.
리턴 void