Click or drag to resize

Ftp Methods

The Ftp type exposes the following members.

Methods
 NameDescription
Public methodAbort Aborts current transfers.
Public methodAppend(String, Byte) Appends the content of the byte array to the file on the server, creating it if it doesn't exists.
Public methodAppend(String, Stream) Appends the content of the data streamto the file on the server, creating it if it doesn't exists.
Public methodAuthSSL Secures the communication with remote server using SSL (explicit SSL). Please use ServerCertificateValidate event to handle self signed certificates.
Obsolete
Public methodAuthTLS Secures the communication with remote server using TLS (explicit SSL/TLS) (RFC 4217). Please use ServerCertificateValidate event to handle self signed certificates.
Public methodBeginConnect(String) Begins an asynchronous request for a remote server connection using DefaultPort.
Public methodBeginConnect(IPEndPoint, Boolean) Begins an asynchronous request for a remote server connection.
(Inherited from TcpTextClient)
Public methodBeginConnect(String, AsyncCallback) Begins an asynchronous request for a remote server connection using DefaultPort.
Public methodBeginConnect(String, Int32) Begins an asynchronous request for a remote server connection. You can use BeginConnectSSL(String, Int32) when SSL connection is needed.
(Inherited from TcpTextClient)
Public methodBeginConnect(String, Int32, Boolean) Begins an asynchronous request for a remote server connection.
(Inherited from TcpTextClient)
Public methodBeginConnect(String, Int32, Boolean, AsyncCallback) Begins an asynchronous request for a remote server connection.
(Inherited from TcpTextClient)
Public methodBeginConnectSSL(String) Begins an asynchronous request for a remote server secure connection using DefaultSSLPort and SSL.
Public methodBeginConnectSSL(String, AsyncCallback) Begins an asynchronous request for a remote server secure connection using DefaultSSLPort and SSL.
Public methodBeginConnectSSL(String, Int32) Begins an asynchronous request for a remote server secure connection using SSL.
(Inherited from TcpTextClient)
Public methodBeginConnectSSL(String, Int32, AsyncCallback) Begins an asynchronous request for a remote server secure connection using SSL.
(Inherited from TcpTextClient)
Public methodChangeFolder Changes the current working folder on the server.
Public methodChangeFolderUp Changes the current working folder on the server one level up.
Public methodClose Sends QUIT command. Releases all resources acquired by this object.
Public methodClose(Boolean) Sends QUIT command. Releases all resources acquired by this object.
Public methodConnect(String) Connects to FTP server on port 21. Use ConnectSSL(String) when SSL connection is needed.
Public methodConnect(IPEndPoint, Boolean) Connects to server.
(Inherited from TcpTextClient)
Public methodConnect(String, Int32) Connects to server. Use ConnectSSL(String, Int32) when SSL connection is needed.
(Inherited from TcpTextClient)
Public methodConnect(IPAddress, Int32, Boolean) Connects to server.
(Inherited from TcpTextClient)
Public methodConnect(String, Int32, Boolean) Connects to server.
(Inherited from TcpTextClient)
Public methodConnectSSL(String) Connects to FTP server using SSL on port 990. Please use ServerCertificateValidate for self signed certificates.
Public methodConnectSSL(String, Int32) Connects to server using SSL.
(Inherited from TcpTextClient)
Public methodCreateAllFolders Creates all the directories and subdirectories in a specified by the remotePath. Some servers implement this feature by default, in such case you can use CreateFolder(String) method.
Public methodCreateFolder Creates a folder on the server.
Public methodDeleteFile Deletes the file on the server.
Public methodDeleteFiles(ListRemoteSearchItem) Deletes specified files from the server.
Public methodDeleteFiles(RemoteSearchOptions) Deletes files from the current server folder, that match specified pattern.
Public methodDeleteFiles(String, RemoteSearchOptions) Deletes files from the server, that match specified pattern.
Public methodDeleteFolder Deletes an empty remote folder with the specified pathname.
Public methodDeleteFolderRecursively Deletes remote folder recursively with the specified pathname.
Public methodDispose Releases all resources acquired by this object. Closes connection, without issuing any quit commands.
(Inherited from TcpTextClient)
Protected methodDispose(Boolean) Releases all resources acquired by this object. Closes connection, without issuing any quit commands.
(Inherited from TcpTextClient)
Public methodDownload(String) Downloads the remote file.
Public methodDownload(String, Int64) Downloads the remote file starting from the specified position. You can check the value of SupportsRestStream of Extensions property to check if this method is supported by the remote server.
Public methodDownload(String, Stream) Downloads the remote file to the data stream.
Public methodDownload(String, String) Downloads the remote file to the local file.
Public methodDownload(String, Int64, Stream) Downloads the remote file to the data stream starting from the specified position. You can check the value of SupportsRestStream of Extensions property to check if this method is supported by the remote server.
Public methodDownloadFiles(String) Downloads remote files from the current server folder to the local location.
Public methodDownloadFiles(String, RemoteSearchOptions) Downloads remote files from the current server folder to local location.
Public methodDownloadFiles(String, ListRemoteSearchItem) Downloads remote files to the local location.
Public methodDownloadFiles(String, String) Downloads remote files to local location.
Public methodDownloadFiles(String, String, RemoteSearchOptions) Downloads remote files to the local location.
Public methodEndConnect Ends a pending asynchronous connection request.
(Inherited from TcpTextClient)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFeat Returns the list of additional features supported by the remote server (FEAT command).
Public methodFileExists Detects whether the specified file exists on the server.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFolderExists Detects whether the specified folder exists on the server.
Public methodGetCurrentFolder Gets the absolute path of the current working folder on the remote server.
Public methodGetFileHash(String, FtpHashType) Returns the checksum of the specified remote file. You can use FileHash class to compute or validate local file checksum.
Public methodGetFileHash(String, FtpHashType, Int64, Int64) Returns the checksum of the specified remote file. You can use FileHash class to compute or validate local file checksum.
Public methodGetFileModificationTime Returns the modification date and time of the specified remote file. This method uses MDTM command (RFC 3659), that may be NOT supported by the server. You can check the value of SupportsMDTM of Extensions property to check if this method is supported by the remote server.
Public methodGetFileSize Returns the size of the specified remote file. You can check the value of SupportsSize of Extensions property to check if this method is supported by the remote server.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetList Returns parsed list of files and folders in the current server folder.
Public methodGetList(String) Returns parsed list of files and folders in the specific server folder.
Protected methodGetServerGreeting Get server's greeting.
(Overrides TcpTextClientGetServerGreeting)
Public methodGetSupportedHashTypes Returns checksum types supported by the server.
Obsolete
Public methodGetSystem Returns the name of the remote OS.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHash Returns the checksum of the specified remote file. You can use FileHash class to compute or validate local file checksum.
Public methodKeepAliveDuringTransfer Sets the interval, at which a NOOP command is sent on the control connection during a file transfer.
Public methodKeepAliveTcp Sets TCP protocol keep alive (SO_KEEPALIVE) option on.
(Inherited from TcpTextClient)
Public methodList Returns parsed list of files and folders in the current server folder. This method uses LIST command. There is no standard that describes LIST command response, GetList is a better choice in most cases.
Public methodList(String) Returns parsed list of files and folders in the specified server folder. This method uses LIST command (RFC 959). There is no standard that describes LIST command response, GetList(String) is a better choice in most cases.
Public methodLogin(String) Logs user in using specified user and empty password.
Public methodLogin(String, String) Logs user in.
Public methodLogin(String, String, String) Logs user in.
Public methodLoginAnonymous Logs user in using "anonymous" as user and "anonymous@example.com" as password.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodMLSD Returns parsed list of files and folders in the current server folder. This method uses MLSD command (RFC 3659), that may be NOT supported by the server.
Public methodMLSD(String) Returns parsed list of files and folders in the specified folder or file information in case of a file. This method uses MLSD command (RFC 3659), that may be NOT supported by the server.
Public methodMLST Returns information about current server folder. This method uses MLST command (RFC 3659), that may be NOT supported by the server.
Public methodMLST(String) Returns information about current server folder. This method uses MLST command (RFC 3659), that may be NOT supported by the server.
Public methodNLST Returns a list of file and folder names in the current server folder. This method uses NLST command (RFC 3659), that may be NOT supported by the server.
Public methodNLST(String) Returns a list of file and folder names in the current server folder. This method uses NLST command (RFC 3659), that may be NOT supported by the server.
Public methodNoop Sends NO OPeration command to the server.
Public methodRename Renames a file or folder on the server.
Public methodSearch Returns all files and folders on the server.
Public methodSearch(RemoteSearchOptions) Searches files and folders on the server that match specified pattern.
Public methodSearch(String, RemoteSearchOptions) Searches files and folders on the server that match specified pattern.
Public methodSend Sends the text command to server. Adds "\r\n" to the command.
(Inherited from TcpTextClient)
Public methodSendCommand(String) Executes command on the FTP server.
Public methodSendCommand(String, Boolean) Executes command on the FTP server.
Public methodSendCommand(String, Object) Executes command on the FTP server.
Public methodSendCommand(String, Boolean, Object) Executes command on the FTP server.
Public methodSendDownloadCommand Executes command on the FTP server and expects response using data channel.
Public methodSetFileModificationTime Sets the modification date and time of the specified remote file. This method uses MFTM (draft-somers-ftp-mfxx-04) or MDTM (RFC 3659) commands, that may be NOT supported by the server.
Public methodSetTransferMode Forces transfer mode change.
Public methodSite Sends SITE command to the server.
Public methodSiteChangeMode(String) Executes SITE CHMOD command: removes all privileges for all.
Public methodSiteChangeMode(String, UnixPermissionSet) Executes SITE CHMOD command - changes the permissions of the file to specified value
Public methodSiteListFormat Executes SITE LISTFMT command: specifies LIST subcommand format on IBM servers.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUpload(String, Byte) Uploads the content of the byte array to the file on the server.
Public methodUpload(String, Stream) Uploads the content of the data stream to the file on the server.
Public methodUpload(String, String) Uploads the content of the local file to the file on the server, overriding it if it already exists.
Public methodUpload(String, Int64, Byte) Uploads the content of the byte array to the file on the server starting from the specified remote position. You can check the value of SupportsRestStream of Extensions property to check if this method is supported by the remote server.
Public methodUpload(String, Int64, Stream) Uploads the content of the data stream to the file on the server from the specified remote position. You can check the value of SupportsRestStream of Extensions property to check if this method is supported by the remote server.
Public methodUploadFiles(String) Uploads local files to the current remote server location.
Public methodUploadFiles(String, LocalSearchOptions) Uploads local files to the current remote server location.
Public methodUploadFiles(String, String) Uploads local files to remote location.
Public methodUploadFiles(String, String, LocalSearchOptions) Uploads local files to remote location.
Public methodUploadUnique(Byte) Uploads the content of the local file to the file with unique name on the server.
Public methodUploadUnique(Stream) Uploads the content of the stream to the file with unique name on the server.
Top
See Also