C# Class SuperPutty.Scp.PscpClient

Simplified version of PscpTransfer class - Movied LoginDialog calls outside - Made calls synchronous...move async outside - Make pieces unit-testable - Work around issue in Process.StandardOuput/StandardError blocking on calls Alternate workaround...native process start w/correct stream reading behavior (e.g. peek doens't block) http://stackoverflow.com/questions/6655613/why-does-standardoutput-read-block-when-startinfo-redirectstandardinput-is-set
Afficher le fichier Open project: sepich/superputty Class Usage Examples

Méthodes publiques

Méthode Description
CopyFiles ( List sourceFiles, SuperPutty.Scp.BrowserFileInfo target, TransferUpdateCallback callback ) : SuperPutty.Scp.FileTransferResult

Copy files

ListDirectory ( SuperPutty.Scp.BrowserFileInfo path ) : SuperPutty.Scp.ListDirectoryResult
MakePath ( string parent, string child ) : string
PscpClient ( PscpOptions options, SessionData session ) : System
ToArgs ( SessionData session, string password, string path ) : string

Private Methods

Méthode Description
EscapeForUnix ( string path ) : string
NewProcess ( string pscpLocation, string args ) : Process

Create a process for running pscp

RunPscp ( SuperPutty.Scp.PscpResult result, string args, string argsToLog, bool>.Func inlineOutHandler, bool>.Func inlineErrHandler, Action successOutHandler ) : void

Run Pscp synchronously

SafeDispose ( ) : void
SafeKill ( Process proc ) : void
ToArgs ( SessionData session, string password, List source, SuperPutty.Scp.BrowserFileInfo target ) : string

Method Details

CopyFiles() public méthode

Copy files
public CopyFiles ( List sourceFiles, SuperPutty.Scp.BrowserFileInfo target, TransferUpdateCallback callback ) : SuperPutty.Scp.FileTransferResult
sourceFiles List
target SuperPutty.Scp.BrowserFileInfo
callback TransferUpdateCallback
Résultat SuperPutty.Scp.FileTransferResult

ListDirectory() public méthode

public ListDirectory ( SuperPutty.Scp.BrowserFileInfo path ) : SuperPutty.Scp.ListDirectoryResult
path SuperPutty.Scp.BrowserFileInfo
Résultat SuperPutty.Scp.ListDirectoryResult

MakePath() public static méthode

public static MakePath ( string parent, string child ) : string
parent string
child string
Résultat string

PscpClient() public méthode

public PscpClient ( PscpOptions options, SessionData session ) : System
options PscpOptions
session SuperPutty.Data.SessionData
Résultat System

ToArgs() public static méthode

public static ToArgs ( SessionData session, string password, string path ) : string
session SuperPutty.Data.SessionData
password string
path string
Résultat string