The SSHSCPClient type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SSHSCPClient |
Default constructor.
|
Methods
| Name | Description | |
|---|---|---|
| CancelResume |
Cancel the resume. Use this method if something goes wrong
and the server is left in an inconsistent state. Not used in
SCP as resume is not supported
| |
| CancelTransfer | Cancels the current transfer. | |
| CdUp |
Change the remote working directory to parent
| |
| ChDir |
Change the remote working directory
| |
| CheckConnection |
Checks if the client has connected to the server and throws an exception if it hasn't.
This is only intended to be used by subclasses
| |
| CheckTimeout |
Check to see if the timeout has expired
| |
| CloseSocket | ||
| Connect |
Establish a connection to the SFTP server
| |
| Delete | Delete the specified remote file. | |
| Dir()()()() |
List current directory's contents as an array of strings of
filenames.
| |
| Dir(String) |
List a directory's contents as an array of strings of filenames.
| |
| Dir(String, Boolean) |
List a directory's contents as an array of strings.
| |
| DirDetails()()()() |
List the current directory's contents as an array of FTPFile objects.
| |
| DirDetails(String) |
List a directory's contents as an array of FTPFile objects.
| |
| DirDetails(String, FTPFileCallback) | ||
| DirDetails(String, Boolean) |
Returns the given directory's contents and optionally that of its subdirectories
as an array of FTPFile objects.
| |
| Equals | (Inherited from Object.) | |
| ExecuteCommand | ||
| Exists |
Checks for the existence of a file on the server.
| |
| Finalize | (Inherited from Object.) | |
| Get(String) | Get data from the SFTP server. | |
| Get(Stream, String) |
Get data from the server
| |
| Get(String, String) |
Get data from the SFTP server using the currently
set transfer mode.
| |
| GetHashCode | (Inherited from Object.) | |
| GetLocalCRC |
Get the CRC-32 checksum for the named local file
| |
| GetRemoteCRC |
Get the CRC-32 checksum for the named remote file. Not supported in SFTP.
| |
| GetType | (Inherited from Object.) | |
| MemberwiseClone | (Inherited from Object.) | |
| MkDir | Create the specified remote working directory. | |
| ModTime | Get modification time for a remote file. | |
| MultipleDelete(String) |
Delete multiple files in the current remote directory
| |
| MultipleDelete(FileFilter) |
Delete multiple files in the current remote directory
| |
| MultipleDelete(String, FileFilter, Boolean) |
Delete multiple files in the current remote directory and its subdirectories.
| |
| MultipleDelete(String, String, Boolean) |
Delete multiple files in the current remote directory and its subdirectories.
| |
| MultipleDeleteDirectories |
Remove a remote directory, and all its files and its subdirectories
| |
| MultipleGet(String, FileFilter) |
Get multiple files into the specified local directory from the current remote directory
| |
| MultipleGet(String, String) |
Get multiple files into the specified local directory from the current remote directory
| |
| MultipleGet(String, String, FileFilter, Boolean) |
Get multiple files from the specified remote directory into the specified local directory
| |
| MultipleGet(String, String, String, Boolean) |
Get multiple files from the specified remote directory into the specified local directory
| |
| MultiplePut(String, FileFilter) |
Put multiple files from the specified local directory into the current remote directory
| |
| MultiplePut(String, String) |
Put multiple files from the specified local directory into the current remote directory
| |
| MultiplePut(String, String, FileFilter, Boolean) |
Put multiple files from the specified local directory into the specified remote directory
| |
| MultiplePut(String, String, String, Boolean) |
Put multiple files from the specified local directory into the specified remote directory
| |
| OnBytesTransferred | ||
| OnCommandSent | ||
| OnReplyReceived | ||
| OnTransferCancelled | ||
| OnTransferCompleteEx | ||
| OnTransferStartedEx | ||
| Put(array<Byte>[]()[][], String) |
Put data onto the server
| |
| Put(Stream, String) |
Put a stream of data onto the FTP server in the current directory.
| |
| Put(String, String) |
Put a local file onto the SFTP server in the current directory.
| |
| Put(array<Byte>[]()[][], String, Boolean) |
Put data onto the SFTP server in the current directory. Allows
appending if current file exists.
| |
| Put(Stream, String, Boolean) |
Put a stream of data onto the FTP server in the current directory. Allows appending
if current file exists
| |
| Put(String, String, Boolean) |
Upload a local file to the server
| |
| Pwd |
Get the current remote working directory
| |
| Quit |
Quit the session
| |
| QuitImmediately |
Quit the session immediately. Just close the socket. Don't send
any messages to the server.
| |
| Rename |
Rename a remote file
| |
| Resume | Make the next file transfer (put or get) resume. | |
| ResumeDownload | Make the next download resume at a specific point. | |
| RmDir |
Remove a directory
| |
| SetModTime | Set modification time for a remote file. | |
| Size |
Get the size of a remote file.
| |
| TestConnection |
Tests the connection
| |
| ToString | (Inherited from Object.) | |
| Unlock |
Unlock the software for use. This method should be used when
a configuration file isn't available
|
Fields
| Name | Description | |
|---|---|---|
| _proxySettings |
Proxy settings
| |
| BLOCKSIZE |
Transfer buffer size
| |
| cancelTransfer | Can be used to cancel a transfer | |
| closeStreamsAfterTransfer |
If true then streams are closed after a transfer has completed.
| |
| compatFlags |
Configuration flags for non-compliant servers
| |
| compressionAlg |
Compression algorithms
| |
| controlPort | ||
| cwd |
Current remote working directory
| |
| DEFAULT_MONITOR_INTERVAL | Default byte interval for transfer monitor | |
| DEFAULT_TIMEOUT |
Default timeout for waiting for a server reply
| |
| deleteOnFailure | If a download to a file fails, delete the partial file | |
| detectTransferMode |
Do we detect transfer mode when transferring files?
| |
| key |
License key
| |
| knownHostsManager | Manages the list of known hosts | |
| lastBytesTransferred |
Holds the number of bytes transferred in that most recent transfer.
| |
| lastFileTransferred |
Name of the last file transferred.
| |
| logTag | Logging tag | |
| monitorInterval | Bytes transferred in between monitor callbacks | |
| owner |
License owner
| |
| prompts |
List of authorization prompts
| |
| remoteHost |
Remote host we are connecting to
| |
| remoteIPAddress |
IP address of remote host in string form
| |
| resume | If true, a file transfer is being resumed | |
| serverValidation | Determines how the remote host is validated | |
| socket | ||
| socks |
SOCKS settings
| |
| throttler |
Threshold for throttling
| |
| timeout | Timeout in milliseconds
| |
| transferBufferSize | Size of transfer buffers | |
| transferNotifyListings | Should BytesTransferred event be triggered in directory listings? | |
| transferType | Record of the transfer type - make the default BINARY |
Properties
| Name | Description | |
|---|---|---|
| AuthenticationMethod |
Get or set the current authentication method being used.
| |
| ClientPrivateKeyBytes | ||
| ClientPrivateKeyFile | Path of the private key file used to authenticate the client | |
| ClientPrivateKeyPassphrase | Passphrase of the private key file. | |
| CloseStreamsAfterTransfer |
If true then streams are closed after a transfer has completed.
| |
| ControlPort |
The port on the server to which to connect the control-channel.
| |
| DeleteOnFailure |
Controls whether or not a file is deleted when a failure occurs.
| |
| DetectTransferMode |
If set to true, the transfer mode in operations involving multiple files is
automatically changed between ASCII and binary as appropriate.
| |
| IsConnected |
Indicates whether the client is currently connected with the server.
| |
| IsResuming |
Returns true if the next transfer is to be resumed (i.e. Resume()()()() has been called).
| |
| KBIPrompts |
Array of prompts used for keyboard interactive (KBI) authentication.
| |
| KnownHosts | Manager of the list of known hosts used to authenticate the server. | |
| LastBytesTransferred |
The number of bytes transferred in the last transfer operation.
| |
| LastFileTransferred |
The remote name/path of the last file transferred.
| |
| LicenseKey |
The license key string.
| |
| LicenseOwner |
The license owner string.
| |
| LogTag | Log tag | |
| MaxPacketSize |
The SSH maximum packet size.
| |
| MaxTransferRate |
The maximum transfer rate in bytes per sec
| |
| Password | Password of account on the server or the passphrase of the private key file. | |
| PreferredCipherAlgorithms | Preferred algorithm(s) to use for encryption. | |
| PreferredCompressionAlgorithms | Preferred algorithm(s) to use for data compression | |
| PreferredHostKeyAlgorithms | Preferred algorithm(s) to use for server authentication via public key | |
| PreferredKeyExchangeMethods | Preferred methods to use for key exchange. | |
| PreferredMACAlgorithms | Preferred MAC algorithm(s) | |
| ProxySettings |
Settings for using proxies.
| |
| RemoteHost |
The domain-name or IP address of the SFTP server.
| |
| RetryAuth |
By default, authentication is retried automatically using a different method if it fails.
| |
| SendInitialWindowAdjust |
Determines whether a SSH_MSG_CHANNEL_WINDOW_ADJUST message should be
sent initially (true by default).
| |
| ServerCompatibility |
Controls various server compatibility features.
| |
| ServerValidation |
Controls the way in which remote servers are validated.
| |
| ShowHiddenFiles |
Include hidden files in operations that involve listing of directories,
and if supported by the server. Not supported in SFTP.
| |
| SocksContext | Obsolete.
Controls SOCKS integration.
| |
| Timeout |
Overall timeout in milliseconds for waiting for messages and underlying
timeouts on sockets.
| |
| TransferBufferSize |
The size of the buffers (in bytes) used in writing to and reading from the data-sockets.
| |
| TransferNotifyInterval |
The number of bytes transferred between each notification of the
BytesTransferred event.
| |
| TransferNotifyListings |
By default the BytesTransferred event is not triggered during directory
listings - this property can be used to enable this behaviour.
| |
| TransferType | The current file transfer type (BINARY or ASCII). | |
| UserName | User-name of account on the server. | |
| WelcomeMessage |
Server's banner.
| |
| WindowSize |
The SSH window size.
|
Events
| Name | Description | |
|---|---|---|
| BytesTransferred |
Event triggered every time TransferNotifyInterval bytes transferred.
| |
| CommandSent |
Triggered every time a command is sent to the server.
| |
| ReplyReceived |
Triggered every time a logical reply is received from the server. In SFTP this will NOT
be triggered for every packet that arrives.
| |
| TransferCancelled |
Notifies of the cancellation of a transfer
| |
| TransferCompleteEx |
Notifies of the completion of a transfer
| |
| TransferStartedEx |
Notifies of the start of a transfer
| |
| ValidatingServer |
Notifies that the server must be validated
|