C# 클래스 Tamir.SharpSsh.Scp

Class for handling SCP file transfers over SSH connection.
상속: Tamir.SharpSsh.SshTransferProtocolBase
파일 보기 프로젝트 열기: soywiz/csharputils 1 사용 예제들

공개 메소드들

메소드 설명
Cancel ( ) : void
From ( string remoteFile, string localPath ) : void

Copies a file from a remote SSH machine to the local machine using SCP.

From ( string remoteFile, string localPath, bool _recursive ) : void

Copies a file from a remote SSH machine to the local machine using SCP.

Get ( string fromFilePath, string toFilePath ) : void
Mkdir ( string dir ) : void

Creates a directory on the remot server

Put ( string fromFilePath, string toFilePath ) : void
Scp ( string host, string user ) : System
Scp ( string host, string user, string password ) : System
To ( string localPath, string remotePath ) : void

Copies a file from local machine to a remote SSH machine.

To ( string localPath, string remotePath, bool _recursive ) : void

Copies a file from local machine to a remote SSH machine.

보호된 메소드들

메소드 설명
ConnectChannel ( ) : void

This function is empty, so no channel is connected on session connect

SCP_CheckConnectivity ( ) : void

Checks is a channel is already connected by this instance

SCP_ConnectFrom ( Channel &channel, Stream &server, string rfile, bool recursive ) : void

Connect a channel to the remote server using the 'SCP From' command ('scp -f')

SCP_ConnectTo ( Channel &channel, Stream &server, string rfile, bool recursive ) : void

Connect a channel to the remote server using the 'SCP TO' command ('scp -t')

SCP_EnterIntoDir ( Stream server, string dir ) : void

Instructs the remote server to enter into a directory

SCP_EnterIntoParent ( Stream server ) : void

Instructs the remote server to go up one level

SCP_ReceiveFile ( Stream server, string rfile, string lfile, int size ) : void

Transfer a file from the remote server

SCP_SendFile ( Stream server, string src, string dst ) : void

Transfer a file to the remote server

비공개 메소드들

메소드 설명
SCP_CheckAck ( Stream ins ) : int

Gets server acknowledgment

SCP_SendAck ( Stream server ) : void

Sends acknowledgment to remote server

ToRecursive ( Stream server, string src, string dst ) : void

Copies files and directories from local machine to a remote SSH machine using SCP.

메소드 상세

Cancel() 공개 메소드

public Cancel ( ) : void
리턴 void

ConnectChannel() 보호된 메소드

This function is empty, so no channel is connected on session connect
protected ConnectChannel ( ) : void
리턴 void

From() 공개 메소드

Copies a file from a remote SSH machine to the local machine using SCP.
public From ( string remoteFile, string localPath ) : void
remoteFile string The remmote file name
localPath string The local destination path
리턴 void

From() 공개 메소드

Copies a file from a remote SSH machine to the local machine using SCP.
public From ( string remoteFile, string localPath, bool _recursive ) : void
remoteFile string The remmote file name
localPath string The local destination path
_recursive bool Value indicating whether a recursive transfer should take place
리턴 void

Get() 공개 메소드

public Get ( string fromFilePath, string toFilePath ) : void
fromFilePath string
toFilePath string
리턴 void

Mkdir() 공개 메소드

Creates a directory on the remot server
public Mkdir ( string dir ) : void
dir string The new directory
리턴 void

Put() 공개 메소드

public Put ( string fromFilePath, string toFilePath ) : void
fromFilePath string
toFilePath string
리턴 void

SCP_CheckConnectivity() 보호된 메소드

Checks is a channel is already connected by this instance
protected SCP_CheckConnectivity ( ) : void
리턴 void

SCP_ConnectFrom() 보호된 메소드

Connect a channel to the remote server using the 'SCP From' command ('scp -f')
protected SCP_ConnectFrom ( Channel &channel, Stream &server, string rfile, bool recursive ) : void
channel Tamir.SharpSsh.jsch.Channel Will contain the new connected channel
server Stream Will contaun the new connected server I/O stream
rfile string The remote path on the server
recursive bool Idicate a recursive scp transfer
리턴 void

SCP_ConnectTo() 보호된 메소드

Connect a channel to the remote server using the 'SCP TO' command ('scp -t')
protected SCP_ConnectTo ( Channel &channel, Stream &server, string rfile, bool recursive ) : void
channel Tamir.SharpSsh.jsch.Channel Will contain the new connected channel
server Stream Will contaun the new connected server I/O stream
rfile string The remote path on the server
recursive bool Idicate a recursive scp transfer
리턴 void

SCP_EnterIntoDir() 보호된 메소드

Instructs the remote server to enter into a directory
protected SCP_EnterIntoDir ( Stream server, string dir ) : void
server Stream A connected server I/O stream
dir string
리턴 void

SCP_EnterIntoParent() 보호된 메소드

Instructs the remote server to go up one level
protected SCP_EnterIntoParent ( Stream server ) : void
server Stream A connected server I/O stream
리턴 void

SCP_ReceiveFile() 보호된 메소드

Transfer a file from the remote server
protected SCP_ReceiveFile ( Stream server, string rfile, string lfile, int size ) : void
server Stream A connected server I/O stream
rfile string The remote file to copy
lfile string The local destination path
size int
리턴 void

SCP_SendFile() 보호된 메소드

Transfer a file to the remote server
protected SCP_SendFile ( Stream server, string src, string dst ) : void
server Stream A connected server I/O stream
src string The source file to copy
dst string The remote destination path
리턴 void

Scp() 공개 메소드

public Scp ( string host, string user ) : System
host string
user string
리턴 System

Scp() 공개 메소드

public Scp ( string host, string user, string password ) : System
host string
user string
password string
리턴 System

To() 공개 메소드

Copies a file from local machine to a remote SSH machine.
public To ( string localPath, string remotePath ) : void
localPath string The local file path.
remotePath string The path of the remote file.
리턴 void

To() 공개 메소드

Copies a file from local machine to a remote SSH machine.
public To ( string localPath, string remotePath, bool _recursive ) : void
localPath string The local file path.
remotePath string The path of the remote file.
_recursive bool
리턴 void