FileTransferClient Class
Namespace: Rebex.Net
Assembly: Rebex.FileTransfer.dll (version 7.0.9147)
This class is based on IFtp interface and provide common functionality for FTP, FTP/SSL and SFTP protocols.
Syntax
public class FileTransferClient : NetworkSession, ILogWriterProvider, IFtp, IDisposable
Inherited Members
Constructors
Name | Description |
---|---|
File |
Creates new instance of FileTransferClient class. |
Properties
Name | Description |
---|---|
Default |
Gets or sets a default log writer used by all new instances of Network |
Encoding | Gets or sets the Encoding to use to encode and decode command parameters and server responses. |
Fingerprint | Gets the server public key fingerprint (for SFTP) or the server certificate thumbprint (for FTP/SSL). |
Ftp |
Gets or sets a value which specifies the way data transfers are made. This is used only when FTP protocol is used. |
Ftp |
Gets or sets the data transfer mode. This is used only when FTP protocol is used. |
Inner | Gets the inner protocol client. It can be Ftp or Sftp class instance. This is based on Connect method parameter. |
Instance |
Gets instance ID (intended for logging purposes).
Inherited from Network |
Is |
Gets a value indicating whether the session is authenticated. |
Is |
Gets a value indicating whether there any operation (method) in progress. This is used only when FTP protocol is used. |
Is |
Gets a value indicating whether the session is connected. |
Is |
Gets the value indicating whether the control connection is secured. |
Local |
Gets the local client End |
Log |
Gets or sets the Log |
Max |
Gets or sets the maximum allowed download speed, in kilobytes. For unlimited speed, set this to zero. |
Max |
Gets or sets the maximum allowed upload speed, in kilobytes. For unlimited speed, set this to zero. |
Proxy | Gets or sets the network proxy to use to access a remote server. |
Remote |
Gets the remote server End |
Server |
Gets the server name, if available. |
Server |
Gets the server port, if available. |
Settings | Gets the options set used by this object. |
Ssh |
Gets the SSH session used by the SFTP part of the client. |
Timeout | Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out). |
Transfer |
Gets or sets the data transfer type. |
User |
Gets the authenticated user name, if available. |
Methods
Name | Description |
---|---|
Abort() | Abort pending operations. |
Change |
Changes the current working directory on the server. |
Change |
Changes the current working directory on the server. |
Check |
Checks whether the session is still connected. Throws an exception on error. |
Connect(String, File |
Connects to the server using chosen protocol. |
Connect(String, Int32, File |
Connects to the server using chosen protocol. |
Connect |
Begins asynchronous Connect operation. Connects to the server using chosen protocol. |
Connect |
Begins asynchronous Connect operation. Connects to the server using chosen protocol. |
Create |
Creates a directory on the server. |
Create |
Creates a directory on the server. |
Delete(File |
Deletes specified files and/or directories on the server. |
Delete(String, Traversal |
Deletes specified files and/or directories on the server. Accepts wildcards. |
Delete |
Deletes specified files and/or directories on the server. |
Delete |
Deletes specified files and/or directories on the server. Accepts wildcards. |
Delete |
Deletes a file on the server. |
Delete |
Deletes a file on the server. |
Directory |
Detects whether the specified directory exists on the server. |
Directory |
Detects whether the specified directory exists on the server. |
Disconnect() | Informs the server that the connection is about to close and terminates the connection. |
Disconnect |
Informs the server that the connection is about to close and terminates the connection. |
Dispose() | Disposes the object. After calling this the inner instance will be disposed as well and Inner will be set to null. |
Download(File |
Downloads the specified files and/or directories from the server to the local directory. |
Download(File |
Downloads the specified files and/or directories from the server to the local directory. |
Download(String, String) | Downloads the specified file or directory hierarchy from the server to the local directory. Accepts wildcards. |
Download(String, String, Traversal |
Downloads the specified file or directory hierarchy from the server to the local directory. Accepts wildcards. |
Download(String, String, Traversal |
Downloads the specified file or directory hierarchy from the server to the local directory. Accepts wildcards. |
Download |
Downloads the specified files and/or directories from the server to the local directory. |
Download |
Downloads the specified file or directory hierarchy from the server to the local directory. Accepts wildcards. |
File |
Detects whether the specified file exists on the server. |
File |
Detects whether the specified file exists on the server. |
Get |
Returns the checksum of the specified file on the server. |
Get |
Returns the checksum of the specified file on the server. |
Get |
Gets the absolute path of the current working directory on the remote server. |
Get |
Gets the absolute path of the current working directory on the remote server. |
Get |
Returns a Stream for reading data from the remote file. |
Get |
Returns a Stream for reading data from the remote file. |
Get |
Returns a Stream for reading data from the remote file. |
Get |
Downloads the remote file to the data stream. |
Get |
Downloads the specified part of the remote file to the data stream. |
Get |
Downloads the remote file to the local file, overriding it if it already exists. |
Get |
Downloads the specified part of the remote file to the specified offset of the local file. |
Get |
Downloads the specified part of the remote file to the data stream. |
Get |
Downloads the specified emote file to the data stream. |
Get |
Downloads the specified part of the remote file to the specified offset of the local file. |
Get |
Downloads the remote file to the specified local file. |
Get |
Retrieves the modification date and time of the specified remote file. |
Get |
Retrieves the modification date and time of the specified remote file. |
Get |
Retrieves the size of the specified remote file. |
Get |
Retrieves the size of the specified remote file. |
Get |
Gets hash code for this object.
Inherited from Network |
Get |
Retrieves a File |
Get |
Retrieves a File |
Get |
Retrieves the list of files and directories specified by the |
Get |
Retrieves the list of files and directories. Matching directories are searched recursively. |
Get |
Retrieves the list of files and directories. |
Get |
Retrieves the list of files and directories specified by the |
Get |
Retrieves the list of files and directories. |
Get |
Retrieves the list of files and directories in the current server directory. |
Get |
Retrieves the list of files and directories in the current server directory. |
Get |
Retrieves the list of files and directories in the current server directory. |
Get |
Retrieves the list of files and directories in the current server directory. |
Get |
Retrieves the list of file and directory names in the current remote directory. |
Get |
Retrieves the list of file and directory names. |
Get |
Retrieves the list of file and directory names. |
Get |
Retrieves the list of file and directory names. |
Get |
Retrieves the raw list of files and directories in the current remote directory using a raw text format. |
Get |
Retrieves the raw list of files and directories using a raw text format. |
Get |
Retrieves the raw list of files and directories using a raw text format. |
Get |
Retrieves the raw list of files and directories using a raw text format. |
Get |
Returns a Stream for writing data to the remote file. |
Get |
Returns a Stream for writing data to the remote file. |
Get |
Returns a Stream for writing data to the remote file. |
Keep |
Sends a command to the server to keep the connection alive. |
Keep |
Sends a command to the server to keep the connection alive. |
Login(Ssh |
Authenticates to the server using GSSAPI. Kerberos (not on .NET CF) and NTLM methods are supported. This method cannot be used with FTP protocol. |
Login(String, Ssh |
Authenticates the user to the server using his private key and initializes the SFTP session. This method cannot be used with FTP protocol. |
Login(String, Ssh |
Authenticates the user to the server using his private key and initializes the SFTP session. |
Login(String, String) | Authenticates the user to the server. |
Login(String, String, Ssh |
Authenticates the user to the server using a combination of password and public key and initializes the SFTP session. This method cannot be used with FTP protocol. |
Login(String, String, Ssh |
Authenticates the user to the server using a combination of password and public key and initializes the SFTP session. This method cannot be used with FTP protocol. |
Login(String, String, String) | Authenticates the user to the FTP server. This method cannot be used with SFTP protocol. |
Login |
Authenticates to the server using GSSAPI. Kerberos (not on .NET CF) and NTLM methods are supported. This method cannot be used with FTP protocol. |
Login |
Asynchronously authenticates the user to the server using his private key and initializes the SFTP session. This method cannot be used with FTP protocol. |
Login |
Begins asynchronous Login operation. Authenticates the user to the server using his private key and initializes the SFTP session. |
Login |
Asynchronously authenticates the user to the server using a combination of password and public key and initializes the SFTP session. This method cannot be used with FTP protocol. |
Login |
Begins asynchronous Login operation. Authenticates the user to the server using a combination of password and public key and initializes the SFTP session. This method cannot be used with FTP protocol. |
Login |
Begins asynchronous Login operation. Authenticates the user to the server. |
Login |
Begins asynchronous Login operation. Authenticates the user to the FTP server. This method cannot be used with SFTP protocol. |
Put |
Uploads the content of the data stream to the file on the server, overriding it if it already exists. |
Put |
Uploads the content of the data stream to the specified offset of the file on the server. |
Put |
Uploads the content of the local file to the file on the server, overriding it if it already exists. |
Put |
Uploads the specified part of the local file to the specified offset of the file on the server. |
Put |
Uploads the content of the data stream to the specified offset of the file on the server. |
Put |
Uploads the content of the data stream to the specified offset of the file on the server. |
Put |
Uploads the specified part of the local file to the specified offset of the file on the server. |
Put |
Uploads the specified part of the local file to the specified offset of the file on the server. |
Remove |
Deletes an empty remote directory with the specified pathname. |
Remove |
Deletes an empty remote directory with the specified pathname. |
Rename(String, String) | Renames or moves a file or directory on the server. |
Rename |
Renames a file or directory on the server. |
Set |
Sets the modification date and time of the specified remote file. |
Set |
Sets the modification date and time of the specified remote file. |
Set |
Sets the socket factory to be used to create communication sockets. |
Upload(File |
Uploads the specified local files and/or directories to the directory to the server. |
Upload(File |
Uploads the specified local files and/or directories to the directory to the server. |
Upload(String, String) | Uploads the specified file or directory hierarchy to the directory on the server. Accepts wildcards. |
Upload(String, String, Traversal |
Uploads the specified file or directory hierarchy to the directory on the server. Accepts wildcards. |
Upload(String, String, Traversal |
Uploads the specified file or directory hierarchy to the directory on the server. Accepts wildcards. |
Upload |
Uploads the specified local files and/or directories to the directory to the server. |
Upload |
Uploads the specified file or directory hierarchy to the directory on the server. Accepts wildcards. |
Events
Name | Description |
---|---|
Delete |
Occurs when a significant action occurs in Delete(String, Traversal |
Fingerprint |
Occurs when a fingerprint is received from the server and needs to be validated. |
List |
Occurs when a file and directory listing item is received by the Get |
Problem |
Occurs when a problem is detected in Download(String, String), Upload(String, String), Delete(String, Traversal |
Transfer |
Occurs when a significant action occurs in Download(String, String), Upload(String, String) methods. Notifies the client about currently processing directory, currently transferring file and progress of the transfer. |
Traversing | Occurs when a significant action occurs in Download(String, String), Upload(String, String), Delete(String, Traversal |
Validating |
Occurs when an FTP/SSL server certificate needs to be validated. |
Explicit Interface Implementations
Name | Description |
---|---|
IFtp. |
Gets the options set used by this object. |