The FTPConnection type exposes the following members.

Methods

  NameDescription
Public methodCancelResume
Cancel the resume.
Public methodCancelTransfer
Cancels the current transfer.
Public methodChangeWorkingDirectory
Changes the working directory.
Public methodChangeWorkingDirectoryUp
Changes to the parent of the current working directory on the server.
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 methodCheckFTPType
Checks the FTP type and throws an exception if it's incorrect.
Public methodClose()()()()
Quit the FTP session.
Public methodClose(Boolean)
Close the FTP connection.
Public methodConnect
Connect to the FTP server and (if AutoLogin is set) log into the server.
Public methodCreateDirectory
Create the specified remote directory.
Public methodCreateObjRef
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 methodDeleteDirectory
Delete the specified remote directory.
Public methodDeleteFile
Delete the specified remote file.
Public methodDirectoryExists
Tests if the given directory exists.
Public methodDispose()()()()
Releases all resources used by the Component.
(Inherited from Component.)
Protected methodDispose(Boolean)
Disconnect from the server (if connected).
(Overrides Component..::..Dispose(Boolean).)
Public methodDownloadByteArray
Download data from the FTP server and return it as a byte-array.
Public methodDownloadFile
Download a file from the FTP server and save it locally.
Public methodDownloadStream
Download a file from the FTP server and write it to the given stream.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExists
Checks for the existence of a file on the server.
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component.)
Protected methodftpClient_BytesTransferred
Event-handler for BytesTransferred events received from IFileTransferClients.
Protected methodftpClient_CommandSent
Event-handler for [!:IFileTransferClient.CommandSent] events received from IFileTransferClients.
Protected methodftpClient_ReplyReceived
Event-handler for [!:IFileTransferClient.ReplyReceived] events received from IFileTransferClients.
Public methodGetCommandHelp
Get the help text for the specified FTP command.
Public methodGetFeatures
Get the server supplied features.
Public methodGetFileInfos()()()()
Returns the working directory's contents as an array of FTPFile objects.
Public methodGetFileInfos(String)
Returns the given directory's contents as an array of FTPFile objects.
Public methodGetFileInfos(String, FTPFileCallback)
Returns the given directory's contents as an array of FTPFile objects.
Public methodGetFiles()()()()
Lists current working directory's contents as an array of strings of file-names.
Public methodGetFiles(String)
List the given directory's contents as an array of strings of file-names.
Public methodGetFiles(String, Boolean)
List the given directory's contents as an array of strings of file-names or full file details.
Public methodGetHashCode
Returns hash-code for this connection.
(Overrides Object..::..GetHashCode()()()().)
Public methodGetLastWriteTime
Get modification time for a remote file.
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetService
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component.)
Public methodGetSize
Get the size of a remote file.
Public methodGetSystemType
Get the type of the operating system at the server.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetURL()()()()
Returns a URL corresponding to the current state of this SecureFTPConnection.
Public methodGetURL(Boolean, Boolean, Boolean)
Returns a URL corresponding to the current state of this SecureFTPConnection. The URL optionally includes the directory, user-name and password.
Public methodGetWorkingDirectory Obsolete.
Returns the working directory on the server.
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodInvokeDelegate
Invokes the given delegate.
Protected methodInvokeEventHandler(Delegate, Object, EventArgs)
Invokes the given event-handler.
Protected methodInvokeEventHandler(Boolean, Delegate, Object, EventArgs)
Invokes the given event-handler.
Protected methodInvokeEventHandler(Boolean, Boolean, Delegate, Object, EventArgs)
Invokes the given event-handler.
Public methodInvokeFTPCommand
Invokes the given literal FTP command on the server.
Public methodInvokeSiteCommand
Invokes the given site command on the server.
Public methodLinkComponent
Public methodLogin
Log into an account on the FTP server using UserName and Password.
Protected methodMemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnBytesTransferred
Called every time a specified number of bytes of data have been transferred.
Protected methodOnChangedLocalDirectory
Called when the local directory has been changed.
Protected methodOnChangedServerDirectory
Called when the server directory has been changed.
Protected methodOnChangingLocalDirectory
Called when the local directory is about to be changed.
Protected methodOnChangingServerDirectory
Called when the server directory is about to be changed.
Protected methodOnClosed()()()() Obsolete.
Called when a connection has closed.
Protected methodOnClosed(Exception)
Called when a connection has closed.
Protected methodOnClosing()()()() Obsolete.
Called when a connection is about to close.
Protected methodOnClosing(Exception)
Called when a connection is about to close.
Protected methodOnConnected(Boolean) Obsolete.
Called when a connection-attempt has completed.
Protected methodOnConnected(Exception)
Called when a connection is about to close.
Protected methodOnConnecting
Called when a connection-attempt is being made.
Protected methodOnCreatedDirectory
Called when a directory has been created.
Protected methodOnCreatingDirectory
Called when a directory is about to be created.
Protected methodOnDeleted
Called when a file deletion operation has completed (though it may have been cancelled).
Protected methodOnDeletedDirectory
Called when a directory has been deleted.
Protected methodOnDeleting
Called when a file is about to be deleted.
Protected methodOnDeletingDirectory
Called when a directory is about to be deleted.
Protected methodOnDirectoryListed
Called when a directory listing has been retrieved.
Protected methodOnDirectoryListing
Called when a directory listing is about to be retrieved.
Protected methodOnDownloaded(array<Byte>[]()[][], String, Int64, Exception, Int64, DateTime)
Called when a file downloading operation has completed (though it may have been cancelled).
Protected methodOnDownloaded(Stream, String, Int64, Exception, Int64, DateTime)
Called when a file downloading operation has completed (though it may have been cancelled).
Protected methodOnDownloaded(String, String, Int64, Boolean, Exception, Int64, DateTime)
Called when a file downloading operation has completed (though it may have been cancelled).
Protected methodOnDownloading(String, Int64%, DateTime%)
Called when a file is about to be downloaded.
Protected methodOnDownloading(Stream, String, Int64, Int64%, DateTime%)
Called when a file is about to be downloaded.
Protected methodOnDownloading(String%, String, Boolean%, Int64%, DateTime%)
Called when a file is about to be downloaded.
Protected methodOnLoggedIn
Called when the client has logged in.
Protected methodOnLoggingIn
Called when the client is about to log in.
Protected methodOnPropertyChanged
Called when a property has been changed.
Protected methodOnRenamed
Called when a file has been renamed.
Protected methodOnRenaming
Called when a file is about to be renamed.
Protected methodOnUploaded(array<Byte>[]()[][], String, Int64, Boolean, Exception)
Called when a file uploading operation has completed (though it may have been cancelled).
Protected methodOnUploaded(Stream, Int64, String, Boolean, Exception, Int64)
Called when a file uploading operation has completed (though it may have been cancelled).
Protected methodOnUploaded(String, String, Int64, Boolean, Boolean, Exception)
Called when a file uploading operation has completed (though it may have been cancelled).
Protected methodOnUploading(array<Byte>[]()[][], String%, Boolean%)
Called when a byte-array is about to be uploaded.
Protected methodOnUploading(Stream, String%, Boolean%, Int64%)
Called when a stream is about to be uploaded.
Protected methodOnUploading(String, String%, Boolean%, Boolean%)
Called when a file is about to be uploaded.
Protected methodPerformAutoLogin
Attempt to log into the server if AutoLogin is on.
Public methodPostLogin
Called after the user has been successfully logged in.
Protected methodRaiseBytesTransferred
Raise the BytesTransferred event.
Protected methodRaiseClosed
Raise the Closed event.
Protected methodRaiseClosing
Raise the Closing event.
Protected methodRaiseCommandSent
Raise the CommandSent event.
Protected methodRaiseConnected
Raise the Connected event.
Protected methodRaiseConnecting
Raise the Connecting event.
Protected methodRaiseCreatedDirectory
Raise the CreatedDirectory event.
Protected methodRaiseCreatingDirectory
Raise the CreatingDirectory event.
Protected methodRaiseDeleted
Raise the Deleted event.
Protected methodRaiseDeletedDirectory
Raise the DeletedDirectory event.
Protected methodRaiseDeleting
Raise the Deleting event.
Protected methodRaiseDeletingDirectory
Raise the DeletingDirectory event.
Protected methodRaiseDirectoryChanged
Raise the DirectoryChanged event.
Protected methodRaiseDirectoryChanging
Raise the DirectoryChanging event.
Protected methodRaiseDirectoryListed
Raise the DirectoryListed event.
Protected methodRaiseDirectoryListing
Raise the DirectoryListing event.
Protected methodRaiseDownloaded
Raise the Downloaded event.
Protected methodRaiseDownloading
Raise the Downloading event.
Protected methodRaiseLocalDirectoryChanged
Raise the LocalDirectoryChanged event.
Protected methodRaiseLocalDirectoryChanging
Raise the LocalDirectoryChanging event.
Protected methodRaiseLoggedIn
Raise the LoggedIn event.
Protected methodRaiseLoggingIn
Raise the LoggingIn event.
Protected methodRaisePropertyChanged
Raise the PropertyChanged event.
Protected methodRaiseRenamedFile
Raise the RenamedFile event.
Protected methodRaiseRenamingFile
Raise the RenamingFile event.
Protected methodRaiseReplyReceived
Raise the ReplyReceived event.
Protected methodRaiseServerDirectoryChanged
Raise the ServerDirectoryChanged event.
Protected methodRaiseServerDirectoryChanging
Raise the ServerDirectoryChanging event.
Protected methodRaiseUploaded
Raise the Uploaded event.
Protected methodRaiseUploading
Raise the Uploading event.
Protected methodRelativePathToAbsolute
Combines a relative path with an absolute path.
Public methodRenameFile
Rename a file or directory.
Public methodResumeNextDownload
Make the next download resume at a specific point.
Public methodResumeNextTransfer
Make the next file transfer (upload or download) resume.
Public methodResumeTransfer Obsolete.
Make the next file transfer (upload or download) resume.
Public methodSendAccountInfo
Supply account info to the FTP server.
Public methodSendPassword
Supply the password for the previously supplied user-name to log into the FTP server. Must be preceeded by the SendUserName(String) method
Public methodSendUserName
Supply the user-name to log into an account on the FTP server. Must be followed by the SendPassword(String) method.
Public methodSetLastWriteTime
Set modification time for a remote file.
Public methodToString
Returns a string representation of the connection.
(Overrides Component..::..ToString()()()().)
Public methodUploadByteArray(array<Byte>[]()[][], String)
Upload an array of bytes to the FTP server in the current working directory.
Public methodUploadByteArray(array<Byte>[]()[][], String, Boolean)
Upload data to the FTP server in the current working directory. Allows appending if current file exists.
Public methodUploadFile(String, String)
Upload a local file to the FTP server in the current working directory.
Public methodUploadFile(String, String, Boolean)
Upload a local file to the FTP server in the current working directory. Allows appending if current file exists.
Public methodUploadStream(Stream, String)
Upload a stream of data to the FTP server in the current working directory.
Public methodUploadStream(Stream, String, Boolean)
Upload a stream of data to the FTP server in the current working directory. Allows appending if current file exists.

See Also