The Ftp type exposes the following members.

Constructors

  Name Description
Public method Ftp()()()()
Creates a new Ftp instance.
Public method Ftp(IContainer)
Public method Ftp(String, String, String)
Creates a new Ftp instance with the specified connection properties.
Public method Ftp(String, String, String, Int32)
Creates a new Ftp instance with the specified connection properties.
Public method Ftp(String, String, String, String)
Creates a new Ftp instance with the specified connection properties.

Methods

  Name Description
Public method ChangePassword
Changes the password
Public method ChangeUser
Changes the currently logged-in user to the specified user without disconnecting from the FTP server.
Public method Checksum(array<Byte>[]()[][], String)
Compares checksum of the local data and remote file.
Public method Checksum(FileInfo, String)
Compares checksum of the local and remote files.
Public method ClearCommandChannel
Clears command channel protection. See RFC 2228 for details.
Public method Connect
Connects to an FTP server and performs login.
Public method CreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public method DeleteDir
Deletes a directory from the FTP server.
Public method DeleteFile
Deletes the remote file from the FTP server.
Public method DirectoryExists
Detects whether the specified directory exists on the server.
Public method DirUp
Sets the current working directory on the FTP server to the parent directory.
Public method Disconnect
Quits FTP session and disconnects from FTP server.
Public method Dispose()()()()
Releases all resources used by the Component.
(Inherited from Component.)
Protected method Dispose(Boolean)
Clean up any resources being used.
(Overrides Component..::..Dispose(Boolean).)
Public method Download(String)
Downloads a file from the FTP server relative to the local directory.
Public method Download(Stream, String)
Downloads the file from the FTP server and writes the contents to the OutputStream.
Public method Download(String, String)
Downloads a file from the FTP server relative to the local directory.
Public method DownloadDir
Downloads the remote directory and all contents recursively from the FTP server.
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public method FileExists
Detects whether the specified file exists on the server.
Protected method Finalize
Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component.)
Public method GetDirListing()()()()
Gets the remote directory listing from the FTP server.
Public method GetDirListing(String)
Gets file listing of files matching filter criteria. Filter is any regular expression supported by the FTP server.
Public method GetDirListingArray()()()()
Gets the remote directory listing from the FTP server.
Public method GetDirListingArray(String)
Gets the remote directory listing from the FTP server.
Public method GetDirListingAsString()()()()
Gets a listing of files from the remote directory.
Public method GetDirListingAsString(String)
Gets a listing of files from the remote directory.
Public method GetFeatures
Returns server features list.
Public method GetFeaturesArray
Returns server features list.
Public method GetFileSize
Gets the file size of the remote file on the FTP server as represented in ASCII.
Public method GetFileTimeStamp
Gets the date/timestamp of the remote file from the FTP server.
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetInputStream
Gets the InputStream from the data connection.
Public method GetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public method GetMachineDirListing
Returns directory listing.
Public method GetMachineDirListingArray
Returns directory listing.
Public method GetMachineFileListing
Gets the file description for the specified filename.
Public method GetNameListing()()()()
Gets the remote directory listing from the FTP server.
Public method GetNameListing(String)
Gets the remote directory listing from the FTP server.
Public method GetOutputStream
Gets the OutputStream from the data connection.
Public method GetResponseCode
Returns the code portion of the last server response.
Protected method GetService
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method InitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public method Interrupted Obsolete.
Checks if the transfer process was interrupted.
Public method IsConnected
Checks if client is connected to FTP server.
Public method IssueCommand
Issues a command to the FTP server.
Public method IssueCommandCheck
Issues a command to the FTP server.
Public method LocalDirListing
Gets the local directory listing.
Public method MakeDir
Makes a sub-directory on the FTP server.
Public method MakeLocalDir
Creates local directory relative to current local directory.
Public method MDelete(String)
Deletes multiple files that match the filter from the FTP server remote directory.
Public method MDelete(String, RegexOptions)
Deletes multiple files that match the filter from the FTP server remote directory.
Public method MDownload(IEnumerator)
Downloads the specified files in the current remote directory from the FTP server to the local directory.
Public method MDownload(String)
Downloads multiple files that match the filter from the FTP server remote directory.
Public method MDownload(String, RegexOptions)
Downloads multiple files that match the filter from the FTP server remote directory.
Protected method MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected method MemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public method MUpload(IEnumerator)
Uploads multiple files from the local directory to the remote directory on the FTP server.
Public method MUpload(String)
Uploads multiple files from the local directory to the remote directory on the FTP server.
Public method MUpload(String, RegexOptions)
Uploads multiple files from the local directory to the remote directory on the FTP server.
Public method Noop
Sends a NOOP (No Operation) command to the FTP server.
Public method RenameFile
Renames the remote file on the FTP server.
Public method Reset Obsolete.
Resets the interrupted flag to false.
Public method ResumeDownload(String)
Resumes the download of the remote file from the FTP server.
Public method ResumeDownload(String, Int64)
Resumes the download of the remote file from the FTP server.
Public method ResumeDownload(String, String)
Resumes the download of the remote file from the FTP server.
Public method ResumeDownload(String, String, Int64)
Resumes the download of the remote file from the FTP server.
Public method ResumeUpload(FileInfo)
Resumes the upload of the file to the FTP server.
Public method ResumeUpload(String)
Resumes the upload of the file to the FTP server.
Public method ResumeUpload(FileInfo, Int64)
Resumes the upload of the file to the FTP server.
Public method ResumeUpload(String, Int64)
Resumes the upload of the file to the FTP server.
Public method ResumeUpload(FileInfo, String, Int64)
Resumes the upload of the file to the FTP server.
Public method ResumeUpload(String, String, Int64)
Resumes the upload of the file to the FTP server.
Public method SetClientCertificate(String)
Sets the client certificate file path. The path must denote valid .cer or PEM file. null value clears the current certificate value and forces the SSL-subsystem to not use the client certificate while SSL-handshake.
Public method SetClientCertificate(String, String)
Sets the client certificate file path together with it's password The path must denote valid .cer or PEM file. null value clears the current certificate value and forces the SSL-subsystem to not use the client certificate while SSL-handshake.
Public method SetFileTimeStamp
Sets the date/timestamp of the remote file from the FTP server.
Public method SetServerCertificate(String)
Sets the server certificates file path. The path must denote valid PKCS#12/PFX file. null value forces the SSL-subsystem to not verify the server certificate while SSL-handshake.
Public method SetServerCertificate(String, String)
Sets the server certificates file path. The path must denote valid PKCS#12/PFX file. null value forces the SSL-subsystem to not verify the server certificate while SSL-handshake.
Public method SetServerVerifier
Sets the server verifier. E.g. To allow server certificates from Untrusted Root Authority use Ftp.SetServerVerifier(new UnTrustedVerifier());
Public method ToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component.)
Public method Upload(FileInfo)
Uploads a local file to the FTP server remote directory.
Public method Upload(String)
Uploads a local file to the FTP server remote directory.
Public method Upload(array<Byte>[]()[][], String)
Uploads a byte array to the FTP server remote directory.
Public method Upload(FileInfo, Boolean)
Uploads a local file to the FTP server remote directory.
Public method Upload(FileInfo, String)
Uploads a local file to the FTP server remote directory.
Public method Upload(String, Boolean)
Uploads a local file to the FTP server remote directory.
Public method Upload(String, String)
Uploads a local file to the FTP server remote directory.
Public method Upload(array<Byte>[]()[][], String, Boolean)
Uploads a byte array to the FTP server remote directory.
Public method Upload(FileInfo, String, Boolean)
Uploads a local file to the FTP server remote directory.
Public method Upload(String, String, Boolean)
Uploads a local file to the FTP server remote directory.
Public method UploadDir(FileInfo)
Uploads the local directory and contents recursively to the FTP server.
Public method UploadDir(String)
Uploads the local directory and contents recursively to the FTP server.
Public method UploadUnique(FileInfo)
Uploads a local file to the FTP server remote directory.
Public method UploadUnique(FileInfo, String)
Uploads a local file to the FTP server remote directory.

Fields

  Name Description
Public field Static member AUTH_SSL
The FTP connection type.
Public field Static member AUTH_TLS
The FTP connection type.
Public field Static member DEFAULT
The default FTP connection type.
Public field Static member IMPLICIT_SSL
The FTP connection type.

Properties

  Name Description
Public property BlockTransferSize
Gets/Sets the Blocksize (in bytes) for use in transferring files. Default blocksize is 4096 bytes.
Protected property CanRaiseEvents
Gets a value indicating whether the component can raise an event.
(Inherited from Component.)
Public property CommandConnection
Gets/Sets the command connection handler.
Public property Compression
Gets or sets whether the data is compressed during the transferring. The data will be compressed if the Ftp server support this feature (MODE Z command)
Public property Connected
Checks if client is connected to FTP server.
Public property ConnectionType
Gets/Sets the current connection type.
Public property Container
Gets the IContainer that contains the Component.
(Inherited from Component.)
Public property DataConnection
Gets/Sets the data connection handler.
Public property DataPort
Gets/Sets the port used for incoming data connections.
Public property DataPortEnd
Gets/Sets the end port used for incoming data connections.
Public property DataPortStart
Gets/Sets the start port used for incoming data connections.
Public property Debug
Gets/Sets the Debugging state. By default all debugging information will be sent to Console.out stream.
Public property DebugStream
Gets/Sets the Stream used in reporting statements. By default the Console.out stream is used.
Protected property DesignMode
Gets a value that indicates whether the Component is currently in design mode.
(Inherited from Component.)
Public property DiskEncoding
Gets/Sets the character encoding used when reading data from disk for ASCII file transfer.
Public property ErrorOnSizeCommand
Gets or sets the indicator value which will be used by methods that invokes GetFileSize.
Protected property Events
Gets the list of event handlers that are attached to this Component.
(Inherited from Component.)
Public property FtpFileParser
Creates an IFtpFileParser instance.
Public property HostName
Gets/Sets the hostname or IP address of the FTP server.
Public property Interrupt
Gets/Sets the current transfer state.
Public property LicenseKey
License key.
Public property Linger
Gets/Sets the length of time that the TCP connection remains open after a call to Close when data remains to be sent.
Public property LocalDir
Gets/Sets the local directory used in an FTP session.
Public property NATAddress
Sets the NAT Address.
Public property Overwrite
Gets or sets whether or not the component should overwrite files during downloads.
Public property Passive
Gets/Sets Passive mode for data connections.
Public property Password
Gets/Sets the password used to log in to the FTP server.
Public property Port
Gets/Sets the port of the FTP server.
Public property PortAddress
Gets or sets the external address to use when using active connections using the PORT command.
Public property ProxyHostname
Gets/Sets the hostname or IP address of the Proxy server.
Public property ProxyPassword
Gets/Sets the password used to log in to the Proxy server.
Public property ProxyPort
Gets/Sets the port of the Proxy server.
Public property ProxyType
Gets/Sets the type of Proxy server.
Public property ProxyUsername
Gets/Sets the username used to log in to the Proxy server.
Public property ReadEncoding
Gets/Sets the character encoding used when reading data commands.
Public property RemoteDir
Gets/Sets the remote directory on the FTP server.
Public property Site
Gets or sets the ISite of the Component.
(Inherited from Component.)
Public property SystemType
Gets the system type of the FTP server.
Public property Timeout
Gets/Sets the timeout (in milliseconds) for opening a connection to the FTP server.
Public property TransferMode
Gets/Sets the Transfer mode.
Public property UseEPSV
Gets or sets the use EPSV command.
Public property User
Gets/Sets the username used to log in to the FTP server.
Public property WireEncoding
Gets/Sets the character encoding used when issuing commands and reading files from the FTP server in ASCII mode.

Events

  Name Description
Public event Disposed
Occurs when the component is disposed by a call to the Dispose()()()() method.
(Inherited from Component.)
Public event FtpAuthenticatedEvent
Occurs when the user has been authenticated and the FTP server is established.
Public event FtpChangeLocalDirEvent
Occurs when the local directory has been changed.
Public event FtpChangeRemoteDirEvent
Occurs when the remote directory has been changed.
Public event FtpCommandEvent
Occurs when a command is sent to the FTP server.
Public event FtpConnectedEvent
Occurs when a connection to the FTP server is established.
Public event FtpConnectionLostEvent
Occurs when a command connection to the FTP server is unexpectedly closed.
Public event FtpDataConnectionLostEvent
Occurs when a data connection to the FTP server is unexpectedly closed.
Public event FtpDisconnectedEvent
Occurs when a connection to the FTP server is released.
Public event FtpDownloadEvent
Occurs when a file is downloaded from the FTP server.
Public event FtpDownloadingEvent
Occurs when a file is downloading from the FTP server.
Public event FtpListingEvent
Occurs when a directory listing is retrieved from the FTP server.
Public event FtpProgressEvent
Indicates the transmit process.
Public event FtpResponseEvent
Occurs when a response is received from the FTP server.
Public event FtpUploadEvent
Occurs when a file is uploaded to the FTP server.
Public event FtpUploadingEvent
Occurs when a file is uploaded to the FTP server.

See Also