edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing

The FTPConnection type exposes the following members.

Constructors

  NameDescription
Public methodFTPConnection()()()()
Default constructor for FTPConnection.
Public methodFTPConnection(IContainer)
Creates an instance of FTPConnection within the given container.
Protected methodFTPConnection(FTPClient)
Create an FTPConnection using the given FTP client.

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 (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()()()() (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(String, String)
Download a file from the FTP server and save it locally.
Public methodDownloadFile(String, String, WriteMode)
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 (Inherited from Object.)
Public methodExists
Checks for the existence of a file on the server.
Protected methodFinalize (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 (Inherited from MarshalByRefObject.)
Protected methodGetService (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 (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 (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()()()() (Inherited from Object.)
Protected methodMemberwiseClone(Boolean) (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(String, String, Int64, WriteMode, 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) Obsolete.
Protected methodOnUploading(array<Byte>[]()[][], String%, Boolean%)
Called when a byte-array is about to be uploaded.
Protected methodOnUploading(String, String%, WriteMode%)
Called when a file is about to be uploaded.
Protected methodOnUploading(Stream, String%, Boolean%, Int64%)
Called when a stream 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, WriteMode)
Upload a local file to the FTP server in the current working directory. Allows appending if current file exists.
Public methodUploadFile(String, String, Boolean) Obsolete.
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.

Fields

  NameDescription
Protected fieldaccountInfoStr
Account information string, for use in FTP/FTPS with the ACCT command.
Protected fieldareEventsEnabled
Determines if events will be fired.
Protected fieldclientLock
Used for locking connection.
Protected fieldStatic memberDEFAULT_WORKING_DIRECTORY
Default initial working directory.
Protected fieldfileTransferType
Record of the transfer type - make the default ASCII.
Protected fieldftpClient
Instance of FTPClient.
Protected fieldftpType
Protocol used.
Protected fieldguiControl
Reference to the main window.
Protected fieldhaveQueriedForControl
Flag used to remember whether or not we've tried to find the main window yet.
Protected fieldhomeDir
User's home directory on the server.
Protected fieldisTransferringData
Determines if events will be fired.
Protected fieldlastTransferCancel
Flag indicating that the most recent transfer-operation was cancelled
Protected fieldlocalDir
Current local working directory.
Protected fieldloginPassword
Password to log in with.
Protected fieldloginUserName
User-name to log in with.
Protected fieldlogTag
Logging tag
Protected fieldremoteDir
Current remote working directory.
Protected fielduseAutoFeatures
Determines if the components will automatically send the FEAT command after logging in.
Protected fielduseAutoLogin
Determines if the components will automatically log in upon connection.
Protected fielduseGuiThread
Flag indicating whether or not event-handlers will run on the GUI thread if one is available.

Properties

  NameDescription
Public propertyAccountInfo
Account information string.
Protected propertyActiveClient
Reference to the currently active IFileTransferClient.
Public propertyActivePortRange
Specifies the range of ports to be used for data-channels in active mode.
Public propertyAutoFeatures
Determines if the component will automatically send the FEAT command.
Public propertyAutoLogin
Determines if the component will automatically log in upon connection.
Public propertyAutoPassiveIPSubstitution
Use AutoPassiveIPSubstitution to ensure that data-socket connections are made to the same IP address that the control socket is connected to.
Public propertyBuildTimestamp
The assembly's build timestamp.
Protected propertyCanRaiseEvents (Inherited from Component.)
Public propertyCloseStreamsAfterTransfer
Determines if transfer-methods taking Streams as arguments should close the stream once the transfer is completed.
Public propertyCommandEncoding
The character-encoding to use for FTP control commands and when dealing with file- and directory-paths.
Public propertyConnectMode
The connection-mode (passive or active) of data-channels.
Public propertyContainer (Inherited from Component.)
Public propertyDataEncoding
The character-encoding to use for transferring data in ASCII mode.
Public propertyDeleteOnFailure
Controls whether or not a file is deleted when a failure occurs.
Protected propertyDesignMode (Inherited from Component.)
Public propertyDirectoryEmptyMessages
Holds fragments of server messages that indicate a directory is empty.
Protected propertyEvents (Inherited from Component.)
Public propertyEventsEnabled
Determines whether or not events are currently enabled.
Public propertyFileInfoParser
Override the chosen file factory with a user created one - meaning that a specific parser has been selected
Public propertyFileNotFoundMessages
Holds fragments of server messages that indicate a file was not found
Public propertyFilePathEncoding Obsolete.
The character-encoding to use when dealing with file- and directory-paths.
Public propertyHomeDirectory
The server-side directory that the client is in immediately after connecting.
Public propertyIsConnected
Indicates whether the FTP client is currently connected with the server.
Public propertyIsTransferring
Indicates whether the FTP client is currently transferring data.
Public propertyLastTransferCancelled
Indicates whether or not the most recent transfer was cancelled.
Public propertyLastValidReply
The latest valid reply from the server.
Public propertyLocalDirectory
The working directory on the local file-system into which files are downloaded.
Public propertyStatic memberLogFile
Name of file to which logs will be written.
Public propertyStatic memberLogLevel
Determines the level of logs written.
Public propertyLogTag
Logging tag
Public propertyStatic memberLogToConsole
Determines whether or not logs will be written to the console.
Public propertyStatic memberLogToTrace
Determines whether or not logs will be written using Trace.
Public propertyName
Name of this component.
Public propertyParentControl
Reference to Windows Forms controls (if available).
Public propertyParsingCulture
The culture for parsing file listings.
Public propertyPassword
Password of account on the server.
Public propertyProtocol
Public propertyPublicIPAddress
IP address of the client as the server sees it.
Public propertyServerAddress
The domain-name or IP address of the FTP server.
Public propertyServerDirectory
The initial/current working directory on the server.
Public propertyServerPort
The port on the server to which to connect the control-channel.
Public propertyShowHiddenFiles
Include hidden files in operations that involve listing of directories, and if supported by the server (FTP and FTPS).
Public propertySite (Overrides Component..::..Site.)
Public propertyStrictReturnCodes
Controls whether or not checking of return codes is strict.
Public propertySynchronizePassiveConnections
For cases where the FTP server does not properly manage PASV connections, it may be necessary to synchronize the creation of passive data sockets. It has been reported that some FTP servers (such as those at Akamai) appear to get confused when multiple FTP clients from the same IP address attempt to connect at the same time (the server sends the same port number to multiple clients).
Public propertyTimeDifference
[FTP/FTPS Only] Time difference between server and client (relative to client).
Public propertyTimeIncludesSeconds
[FTP/FTPS Only] Indicates whether seconds were included in the most recent directoy listing.
Public propertyTimeout
TCP timeout (in milliseconds) of the underlying sockets (0 means none).
Public propertyTransferBufferSize
The size of the buffers used in writing to and reading from the data-sockets.
Public propertyTransferCompleteMessages
Holds fragments of server messages that indicate a transfer completed.
Public propertyTransferNotifyInterval
The number of bytes transferred between each notification of the BytesTransferred event.
Public propertyTransferNotifyListings
By default the BytesTransferred event is not triggered during directory listings - this property can be used to enable this behaviour.
Public propertyTransferType
The current file transfer type (BINARY or ASCII).
Public propertyUseGuiThreadIfAvailable
Determines whether or not event-handlers will be run on the GUI thread if one is available.
Public propertyUserName
User-name of account on the server.
Public propertyVersion
The version of the assembly.
Public propertyWelcomeMessage
Server's welcome message.
Public propertyWorkingDirectory Obsolete.
The current working directory on the server.

Events

  NameDescription
Public eventBytesTransferred
Occurs every time a specified number of bytes of data have been transferred.
Public eventClosed
Occurs when the component has closed its connection to the server.
Public eventClosing
Occurs when the component is about to close its connection to the server.
Public eventCommandSent
Occurs when a command is sent to the server.
Public eventConnected
Occurs when the component has connected to the server.
Public eventConnecting
Occurs when the component is connecting to the server.
Public eventCreatedDirectory
Occurs when a local directory has been created on the server.
Public eventCreatingDirectory
Occurs when a directory is about to be created on the server.
Public eventDeleted
Occurs when a file has been deleted from the server.
Public eventDeletedDirectory
Occurs when a local directory has been deleted on the server.
Public eventDeleting
Occurs when a file is about to be deleted from the server.
Public eventDeletingDirectory
Occurs when a directory is about to be deleted on the server.
Public eventDirectoryChanged Obsolete.
Occurs when the server directory has been changed.
Public eventDirectoryChanging Obsolete.
Occurs when the server directory is about to be changed.
Public eventDirectoryListed
Occurs when a directory listing operations is completed.
Public eventDirectoryListing
Occurs when a directory listing operations is commenced.
Public eventDisposed (Inherited from Component.)
Public eventDownloaded
Occurs when a file has been downloaded from the server.
Public eventDownloading
Occurs when a file is about to be downloaded from the server.
Public eventLocalDirectoryChanged
Occurs when the local directory has been changed.
Public eventLocalDirectoryChanging
Occurs when the local directory is about to be changed.
Public eventLoggedIn
Occurs when the component has logged in.
Public eventLoggingIn
Occurs when the component is about to log in.
Public eventPropertyChanged
Occurs when a property is changed.
Public eventRenamedFile
Occurs when a remote file has been renamed.
Public eventRenamingFile
Occurs when a remote file is about to be renamed.
Public eventReplyReceived
Occurs when a reply is received from the server.
Public eventServerDirectoryChanged
Occurs when the server directory has been changed.
Public eventServerDirectoryChanging
Occurs when the server directory is about to be changed.
Public eventUploaded
Occurs when a file has been uploaded to the server.
Public eventUploading
Occurs when a file is about to be uploaded to the server.

See Also