Click or drag to resize

FtpClient Class

Represents a FTP session.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      GSF.Net.FtpFtpClient

Namespace: GSF.Net.Ftp
Assembly: GSF.Net (in GSF.Net.dll) Version: 2.4.207-beta
Syntax
[ToolboxBitmapAttribute(typeof(FtpClient))]
[DefaultPropertyAttribute("Server")]
[DefaultEventAttribute("FileTransferProgress")]
public class FtpClient : Component
View Source

The FtpClient type exposes the following members.

Constructors
 NameDescription
Public methodFtpClient Constructs a new FTP session using the default settings.
Public methodFtpClient(Boolean) Constructs a new FTP session using the specified settings.
Public methodFtpClient(IContainer) Initializes a new instance of the FtpClient class.
Top
Properties
 NameDescription
Public propertyActiveAddress Gets or sets the IP address to send with the PORT command.
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event.
(Inherited from Component)
Public propertyCaseInsensitive Gets or sets FTP case sensitivity of file and directory names.
Public propertyContainerGets the IContainer that contains the Component.
(Inherited from Component)
Public propertyControlChannel Gets the current FTP control channel.
Public propertyCurrentDirectory Gets or sets current FTP session directory.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode.
(Inherited from Component)
Protected propertyEventsGets the list of event handlers that are attached to this Component.
(Inherited from Component)
Public propertyIsBusy Returns true if FTP session is currently busy.
Public propertyIsConnected Returns true if FTP session is currently connected.
Public propertyMaxActivePort Gets or sets the maximum value in the range of ports used when listening for connections in active mode.
Public propertyMinActivePort Gets or sets the minimum value in the range of ports used when listening for connections in active mode.
Public propertyPassive Gets or sets the passive/active mode of the server.
Public propertyPort Gets or sets FTP server port to use, defaults to 21.
Public propertyRootDirectory Gets FTP session root directory entry.
Public propertyServer Gets or sets FTP server name (DNS name or IP).
Public propertySiteGets or sets the ISite of the Component.
(Inherited from Component)
Public propertyTimeout Gets or sets the timeout, in milliseconds, for read and write operations, defaults to 30 seconds.
Public propertyWaitLockTimeout Gets or sets maximum number of seconds to wait for read lock for files to be uploaded. Defaults to 10 seconds.
Top
Methods
 NameDescription
Public methodAbortTransfer Aborts current file transfer.
Public methodClose Closes current FTP session.
Public methodConnect Connects to FTP server using specified credentials.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
Public methodDisposeReleases all resources used by the Component.
(Inherited from Component)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the FtpClient object and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean))
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container.
(Inherited from Component)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Protected methodMemberwiseCloneCreates 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)
Public methodSetCurrentDirectory Changes the current FTP session directory to the specified path.
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)
Top
Events
 NameDescription
Public eventBeginFileTransfer Raised when file transfer begins.
Public eventCommandSent Raised when FTP command has been sent.
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method.
(Inherited from Component)
Public eventEndFileTransfer Raised when file transfer completes.
Public eventFileTransferNotification Raised when asynchronous file transfer process has completed (success or failure).
Public eventFileTransferProgress Raised as file transfer is progressing.
Public eventResponseReceived Raised when FTP response has been received.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
Creates a client connection to an FTP server for uploading or downloading files.
See Also