The SSHSCPClient type exposes the following members.

Constructors

  NameDescription
Public methodSSHSCPClient
Default constructor.

Methods

  NameDescription
Public methodCancelResume
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
Public methodCancelTransfer
Cancels the current transfer.
Public methodCdUp
Change the remote working directory to parent
Public methodChDir
Change the remote working directory
Protected methodCheckConnection
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
Protected methodCheckTimeout
Check to see if the timeout has expired
Protected methodCloseSocket
Public methodConnect
Establish a connection to the SFTP server
Public methodDelete
Delete the specified remote file.
Public methodDir()()()()
List current directory's contents as an array of strings of filenames.
Public methodDir(String)
List a directory's contents as an array of strings of filenames.
Public methodDir(String, Boolean)
List a directory's contents as an array of strings.
Public methodDirDetails()()()()
List the current directory's contents as an array of FTPFile objects.
Public methodDirDetails(String)
List a directory's contents as an array of FTPFile objects.
Public methodDirDetails(String, FTPFileCallback)
Public methodDirDetails(String, Boolean)
Returns the given directory's contents and optionally that of its subdirectories as an array of FTPFile objects.
Public methodEquals (Inherited from Object.)
Public methodExecuteCommand
Public methodExists
Checks for the existence of a file on the server.
Protected methodFinalize (Inherited from Object.)
Public methodGet(String)
Get data from the SFTP server.
Public methodGet(Stream, String)
Get data from the server
Public methodGet(String, String)
Get data from the SFTP server using the currently set transfer mode.
Public methodGetHashCode (Inherited from Object.)
Public methodGetLocalCRC
Get the CRC-32 checksum for the named local file
Public methodGetRemoteCRC
Get the CRC-32 checksum for the named remote file. Not supported in SFTP.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMkDir
Create the specified remote working directory.
Public methodModTime
Get modification time for a remote file.
Public methodMultipleDelete(String)
Delete multiple files in the current remote directory
Public methodMultipleDelete(FileFilter)
Delete multiple files in the current remote directory
Public methodMultipleDelete(String, FileFilter, Boolean)
Delete multiple files in the current remote directory and its subdirectories.
Public methodMultipleDelete(String, String, Boolean)
Delete multiple files in the current remote directory and its subdirectories.
Public methodMultipleDeleteDirectories
Remove a remote directory, and all its files and its subdirectories
Public methodMultipleGet(String, FileFilter)
Get multiple files into the specified local directory from the current remote directory
Public methodMultipleGet(String, String)
Get multiple files into the specified local directory from the current remote directory
Public methodMultipleGet(String, String, FileFilter, Boolean)
Get multiple files from the specified remote directory into the specified local directory
Public methodMultipleGet(String, String, String, Boolean)
Get multiple files from the specified remote directory into the specified local directory
Public methodMultiplePut(String, FileFilter)
Put multiple files from the specified local directory into the current remote directory
Public methodMultiplePut(String, String)
Put multiple files from the specified local directory into the current remote directory
Public methodMultiplePut(String, String, FileFilter, Boolean)
Put multiple files from the specified local directory into the specified remote directory
Public methodMultiplePut(String, String, String, Boolean)
Put multiple files from the specified local directory into the specified remote directory
Protected methodOnBytesTransferred
Protected methodOnCommandSent
Protected methodOnReplyReceived
Protected methodOnTransferCancelled
Protected methodOnTransferCompleteEx
Protected methodOnTransferStartedEx
Public methodPut(array<Byte>[]()[][], String)
Put data onto the server
Public methodPut(Stream, String)
Put a stream of data onto the FTP server in the current directory.
Public methodPut(String, String)
Put a local file onto the SFTP server in the current directory.
Public methodPut(array<Byte>[]()[][], String, Boolean)
Put data onto the SFTP server in the current directory. Allows appending if current file exists.
Public methodPut(Stream, String, Boolean)
Put a stream of data onto the FTP server in the current directory. Allows appending if current file exists
Public methodPut(String, String, Boolean)
Upload a local file to the server
Public methodPwd
Get the current remote working directory
Public methodQuit
Quit the session
Public methodQuitImmediately
Quit the session immediately. Just close the socket. Don't send any messages to the server.
Public methodRename
Rename a remote file
Public methodResume
Make the next file transfer (put or get) resume.
Public methodResumeDownload
Make the next download resume at a specific point.
Public methodRmDir
Remove a directory
Public methodSetModTime
Set modification time for a remote file.
Public methodSize
Get the size of a remote file.
Public methodTestConnection
Tests the connection
Public methodToString (Inherited from Object.)
Public methodUnlock
Unlock the software for use. This method should be used when a configuration file isn't available

Fields

  NameDescription
Protected field_proxySettings
Proxy settings
Protected fieldStatic memberBLOCKSIZE
Transfer buffer size
Protected fieldcancelTransfer
Can be used to cancel a transfer
Protected fieldcloseStreamsAfterTransfer
If true then streams are closed after a transfer has completed.
Protected fieldcompatFlags
Configuration flags for non-compliant servers
Protected fieldcompressionAlg
Compression algorithms
Protected fieldcontrolPort
Protected fieldcwd
Current remote working directory
Protected fieldStatic memberDEFAULT_MONITOR_INTERVAL
Default byte interval for transfer monitor
Protected fieldStatic memberDEFAULT_TIMEOUT
Default timeout for waiting for a server reply
Protected fielddeleteOnFailure
If a download to a file fails, delete the partial file
Protected fielddetectTransferMode
Do we detect transfer mode when transferring files?
Protected fieldkey
License key
Protected fieldknownHostsManager
Manages the list of known hosts
Protected fieldlastBytesTransferred
Holds the number of bytes transferred in that most recent transfer.
Protected fieldlastFileTransferred
Name of the last file transferred.
Protected fieldlogTag
Logging tag
Protected fieldmonitorInterval
Bytes transferred in between monitor callbacks
Protected fieldowner
License owner
Protected fieldprompts
List of authorization prompts
Protected fieldremoteHost
Remote host we are connecting to
Protected fieldremoteIPAddress
IP address of remote host in string form
Protected fieldresume
If true, a file transfer is being resumed
Protected fieldserverValidation
Determines how the remote host is validated
Protected fieldsocket
Protected fieldsocks
SOCKS settings
Protected fieldthrottler
Threshold for throttling
Protected fieldtimeout
Timeout in milliseconds
Protected fieldtransferBufferSize
Size of transfer buffers
Protected fieldtransferNotifyListings
Should BytesTransferred event be triggered in directory listings?
Protected fieldtransferType
Record of the transfer type - make the default BINARY

Properties

  NameDescription
Public propertyAuthenticationMethod
Get or set the current authentication method being used.
Public propertyClientPrivateKeyBytes
Public propertyClientPrivateKeyFile
Path of the private key file used to authenticate the client
Public propertyClientPrivateKeyPassphrase
Passphrase of the private key file.
Public propertyCloseStreamsAfterTransfer
If true then streams are closed after a transfer has completed.
Public propertyControlPort
The port on the server to which to connect the control-channel.
Public propertyDeleteOnFailure
Controls whether or not a file is deleted when a failure occurs.
Public propertyDetectTransferMode
If set to true, the transfer mode in operations involving multiple files is automatically changed between ASCII and binary as appropriate.
Public propertyIsConnected
Indicates whether the client is currently connected with the server.
Public propertyIsResuming
Returns true if the next transfer is to be resumed (i.e. Resume()()()() has been called).
Public propertyKBIPrompts
Array of prompts used for keyboard interactive (KBI) authentication.
Public propertyKnownHosts
Manager of the list of known hosts used to authenticate the server.
Public propertyLastBytesTransferred
The number of bytes transferred in the last transfer operation.
Public propertyLastFileTransferred
The remote name/path of the last file transferred.
Public propertyLicenseKey
The license key string.
Public propertyLicenseOwner
The license owner string.
Public propertyLogTag
Log tag
Public propertyMaxPacketSize
The SSH maximum packet size.
Public propertyMaxTransferRate
The maximum transfer rate in bytes per sec
Public propertyPassword
Password of account on the server or the passphrase of the private key file.
Public propertyPreferredCipherAlgorithms
Preferred algorithm(s) to use for encryption.
Public propertyPreferredCompressionAlgorithms
Preferred algorithm(s) to use for data compression
Public propertyPreferredHostKeyAlgorithms
Preferred algorithm(s) to use for server authentication via public key
Public propertyPreferredKeyExchangeMethods
Preferred methods to use for key exchange.
Public propertyPreferredMACAlgorithms
Preferred MAC algorithm(s)
Public propertyProxySettings
Settings for using proxies.
Public propertyRemoteHost
The domain-name or IP address of the SFTP server.
Public propertyRetryAuth
By default, authentication is retried automatically using a different method if it fails.
Public propertySendInitialWindowAdjust
Determines whether a SSH_MSG_CHANNEL_WINDOW_ADJUST message should be sent initially (true by default).
Public propertyServerCompatibility
Controls various server compatibility features.
Public propertyServerValidation
Controls the way in which remote servers are validated.
Public propertyShowHiddenFiles
Include hidden files in operations that involve listing of directories, and if supported by the server. Not supported in SFTP.
Public propertySocksContext Obsolete.
Controls SOCKS integration.
Public propertyTimeout
Overall timeout in milliseconds for waiting for messages and underlying timeouts on sockets.
Public propertyTransferBufferSize
The size of the buffers (in bytes) used in writing to and reading from the data-sockets.
Public propertyTransferNotifyInterval
The number of bytes transferred between each notification of the BytesTransferred event.
Public propertyTransferNotifyListings
By default the BytesTransferred event is not triggered during directory listings - this property can be used to enable this behaviour.
Public propertyTransferType
The current file transfer type (BINARY or ASCII).
Public propertyUserName
User-name of account on the server.
Public propertyWelcomeMessage
Server's banner.
Public propertyWindowSize
The SSH window size.

Events

  NameDescription
Public eventBytesTransferred
Event triggered every time TransferNotifyInterval bytes transferred.
Public eventCommandSent
Triggered every time a command is sent to the server.
Public eventReplyReceived
Triggered every time a logical reply is received from the server. In SFTP this will NOT be triggered for every packet that arrives.
Public eventTransferCancelled
Notifies of the cancellation of a transfer
Public eventTransferCompleteEx
Notifies of the completion of a transfer
Public eventTransferStartedEx
Notifies of the start of a transfer
Public eventValidatingServer
Notifies that the server must be validated

See Also