SocketTools .NET Edition

FtpClient Members

FtpClient overview

Public Static (Shared) Fields

ftpPortDefault A constant value which specifies the default port number.
ftpPortSecure A constant value which specifies the default port number for a secure connection using the SSL or TLS protocols.
ftpPortSSH A constant value which specifies the default port number for a secure connection using the SSH1 or SSH2 protocols.
ftpTimeout A constant value which specifies the default timeout period.

Public Instance Constructors

FtpClient Constructor Initializes a new instance of the FtpClient class.

Public Instance Properties

Account Get or sets a value that specifies the account name for the current user.
ActivePorts Gets and sets the port numbers used for active mode file transfers.
AutoResolve Gets and sets a value that determines if host names and addresses are automatically resolved.
Blocking Gets and sets a value which indicates if the client is in blocking mode.
BufferSize Gets and sets the size of the internal send and receive buffer that will be used during data transfers.
CertificateExpires Get a value that specifies the date that the security certificate expires.
CertificateIssued Get a value that specifies the date that the security certificate was issued.
CertificateIssuer Get a value that provides information about the organization that issued the certificate.
CertificateName Gets and sets a value that specifies the name of the security certificate.
CertificateStatus Gets a value which indicates the status of the security certificate returned by the remote host.
CertificateStore Gets and sets a value that specifies the name of the local certificate store.
CertificateSubject Gets a value that provides information about the organization that the server certificate was issued to.
ChannelMode Set or return the security mode for the specified communications channel.
CipherStrength Gets a value that indicates the length of the key used by the encryption algorithm for a secure connection.
DirectoryFormat Gets and sets a value which specifies the current directory format type.
Features Gets and sets the features that are currently enabled for the current session.
FileMask Gets and sets the value which specifies the default wildcard file mask.
FileType Gets and sets a value which specifies the type of file that is being transferred.
Fingerprint Gets a value that can be used to uniquely identify the server.
Handle Gets a value that specifies the client handle allocated for the current session.
HashStrength Gets a value which specifies the length of the message digest that was selected for a secure connection.
HostAddress Gets and sets a value which specifies the Internet address used to establish a connection.
HostName Gets and sets a value which specifies the host name used to establish a connection.
IsBlocked Gets a value which indicates if the current thread is performing a blocking client operation.
IsConnected Gets a value which indicates if a connection to the remote host has been established.
IsInitialized Gets a value which indicates if the current instance of the class has been initialized successfully.
IsReadable Gets a value which indicates if there is data available to be read from the socket connection to the server.
IsWritable Gets a value which indicates if data can be written to the client without blocking.
KeepAlive Gets and sets a boolean value which specifies if the client should attempt to keep the server connection alive.
LastError Gets and sets a value which specifies the last error that has occurred.
LastErrorString Gets a value which describes the last error that has occurred.
LocalAddress Gets and sets the local Internet address that the client will be bound to.
Localize Gets and sets a value which specifies if time and dates should be adjusted for the current timezone.
LocalName Gets a value which specifies the host name for the local system.
LocalPort Gets and sets a value which specifies the local port number the client will be bound to.
LocalService Gets and sets a value which specifies the local service the client will be bound to.
Options Gets and sets a value which specifies one or more client options.
ParseList Gets and sets a value that specifies if directory listings should be automatically parsed
Passive Gets and sets a value which specifies if passive mode file transfers should be enabled.
Password Gets and sets the password used to authenticate the client session.
Priority Gets and sets a value which specifies the priority of file transfers.
ProxyHost Gets and sets the hostname or IP address of a proxy server.
ProxyPassword Gets and sets the password used to authenticate the connection to a proxy server.
ProxyPort Gets and sets a value that specifies the proxy server port number.
ProxyType Gets and sets the type of proxy server the client will use to establish a connection.
ProxyUser Gets and sets the username used to authenticate the connection to a proxy server.
RemoteFile Gets and sets the file name specified in the current URL.
RemotePath Gets and sets the path specified in the current URL.
RemotePort Gets and sets a value which specifies the remote port number.
RemoteService Gets and sets a value which specifies the remote service.
ResultCode Gets a value which specifies the last result code returned by the server.
ResultString Gets a string value which describes the result of the previous command.
Secure Gets and sets a value which specifies if a secure connection is established.
SecureCipher Gets a value that specifies the encryption algorithm used for a secure connection.
SecureHash Gets a value that specifies the message digest algorithm used for a secure connection.
SecureKeyExchange Gets a value that specifies the key exchange algorithm used for a secure connection.
SecureProtocol Gets and sets a value which specifies the protocol used for a secure connection.
Status Gets a value which specifies the current status of the client.
System Gets a string value which identifies the server.
ThreadModel Gets and sets a value which specifies the threading model for the class instance.
ThrowError Gets and sets a value which specifies if method calls should throw exceptions when an error occurs.
Timeout Gets and sets a value which specifies a timeout period in seconds.
TimeZone Gets and sets the current timezone offset in seconds.
Trace Gets and sets a value which indicates if socket function tracing is enabled.
TraceFile Gets and sets a value which specifies the name of the client function tracing logfile.
TraceFlags Gets and sets a value which specifies the client function tracing flags.
TransferBytes Gets a value which specifies the number of bytes transferred to or from the remote server.
TransferTime Gets a value which specifies the number of milliseconds elapsed during a data transfer.
URL Gets and sets the current URL used to access a file on the server.
UserName Gets and sets the username used to authenticate the client session.
Version Gets a value which returns the current version of the FtpClient class library.

Public Instance Methods

AddFileType Associate a file name extension with a specific file type.
AttachThread Attach an instance of the class to the current thread
Cancel Cancel the current blocking client operation.
ChangeDirectory Change the current working directory on the remote server.
CloseDirectory Close the directory that was previously opened with the OpenDirectory method.
CloseFile Close the file that was previously opened with the OpenFile method.
Command Overloaded. Send a custom command to the server.
Connect Overloaded. Establish a connection with a remote host.
CreateFile Create a new file or overwrite an existing file.
DeleteFile Delete a file on the remote server.
Disconnect Terminate the connection with the remote server.
Dispose Overloaded. Releases all resources used by FtpClient.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
FileList Overloaded. Return a list of files on the remote host.
GetData Overloaded. Transfers the contents of a file on the server and stores it in byte array.
GetDirectory Return the current working directory.
GetFile Overloaded. Download a file from the server to the local system.
GetFilePermissions Return the access permissions for a file on the remote system.
GetFileSize Returns the size of the specified file on the remote server.
GetFileStatus  
GetFileTime Overloaded. Returns the modification date and time for specified file on the remote server.
GetFirstFile Overloaded. Get information about the first file in a directory listing returned by the server.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetMultipleFiles Download multiple files from the server to the local system using a wildcard mask.
GetNextFile Overloaded. Get information about the next file in a directory listing returned by the server.
GetType (inherited from Object) Gets the Type of the current instance.
Initialize Overloaded. Initialize an instance of the FtpClient class.
Login Overloaded. Login to the remote server.
Logout Log the current user off the server.
MakeDirectory Create a new directory on the server.
OpenDirectory Overloaded. Open the specified directory on the server.
OpenFile Overloaded. Open an existing file or create a new file on the server.
PutData Overloaded. Transfers data from a byte array and stores it in a file on the remote server.
PutFile Overloaded. Upload a file from the local system to the server.
PutMultipleFiles Upload multiple files from the local system to the server using a wildcard mask.
Read Overloaded. Read file data from the server and store it in a byte array.
RemoveDirectory Remove a directory on the server.
RenameFile Change the name of a file on the server.
Reset Reset the internal state of the object, resetting all properties to their default values.
SetFilePermissions Change the access permissions for a file on the server.
SetFileTime Changes the modification date and time for a file on the server.
ToString (inherited from Object) Returns a String that represents the current Object.
Uninitialize Uninitialize the class library and release any resources allocated for the current thread.
VerifyFile Overloaded. Verify that the contents of a file on the local system are the same as the specified file on the server.
Write Overloaded. Write one or more bytes of data to the server.

Public Instance Events

OnCancel Occurs when a blocking client operation is canceled.
OnCommand Occurs when the client sends a command to the remote host and receives a reply indicating the result of that command.
OnConnect Occurs when a connection is established with the remote host.
OnDisconnect Occurs when the remote host disconnects from the local system.
OnError Occurs when an socket operation fails.
OnFileList Occurs when a directory listing is parsed by the class.
OnGetFile Occurs when a file download has been initiated.
OnLastFile Occurs when the last file in a directory listing has been processed.
OnProgress Occurs as a data stream is being read or written to the socket.
OnPutFile Occurs when a file upload is initiated.
OnRead Occurs when data is available to be read from the socket.
OnTimeout Occurs when a blocking operation fails to complete before the timeout period elapses.
OnWrite Occurs when data can be written to the socket.

Protected Instance Methods

Dispose Overloaded. Releases the unmanaged resources allocated by the FtpClient class and optionally releases the managed resources.
Finalize Destroys an instance of the class, releasing the resources allocated for the session and unloading the networking library.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

FtpClient Class | SocketTools Namespace