Click or drag to resize

FtpFileWatcher Class

FTP File Watcher
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      GSF.Net.FtpFtpFileWatcher

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

The FtpFileWatcher type exposes the following members.

Constructors
 NameDescription
Public methodFtpFileWatcher Constructs a new FTP file watcher using the default settings.
Public methodFtpFileWatcher(IContainer) Initializes a new instance of the FtpFileWatcher class.
Public methodFtpFileWatcher(Boolean, Boolean) Constructs a new FTP file watcher using the specified settings.
Top
Properties
 NameDescription
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)
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode.
(Inherited from Component)
Public propertyDirectory Gets or sets name of FTP directory name to monitor. Leave blank to monitor initial FTP session directory.
Public propertyEnabled Gets or sets enabled state of the FtpFileWatcher object.
Protected propertyEventsGets the list of event handlers that are attached to this Component.
(Inherited from Component)
Public propertyIsConnected Returns true if FTP file watcher session is connected.
Public propertyNotifyOnComplete Sets flag for notification time. Set to true to only notify when a file is finished uploading, set to False to get an immediate notification when a new file is detected.
Public propertyPort Gets or sets FTP server port to use, defaults to 21.
Public propertyServer Gets or sets FTP server name (DNS name or IP) to watch.
Public propertySiteGets or sets the ISite of the Component.
(Inherited from Component)
Public propertyWatchInterval Gets or sets interval, in seconds, to scan for file changes on monitored FTP directory.
Top
Methods
 NameDescription
Public methodCloneFtpSession Clones FTP session used by file watcher so it can be used for other purposes.
Public methodClose Closes FTP session and clears resources used by the FtpFileWatcher.
Public methodConnect Connects to FTP server and enables file watching if Enabled is true.
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 FtpFileWatcher 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)
Protected methodOnCommandSent Raises CommandSent event.
Protected methodOnFileAdded Raises FileAdded event.
Protected methodOnFileDeleted Raises FileDeleted event.
Protected methodOnResponseReceived Raises ResponseReceived event.
Protected methodOnStatus Raises Status event.
Public methodReset Resets and restarts FTP session used by FTP file watcher.
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 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 eventFileAdded Raised when new file is added to monitored FTP directory.
Public eventFileDeleted Raised when file is deleted from monitored FTP directory.
Public eventResponseReceived Raised when FTP response has been received.
Public eventStatus Raised when new status messages come from the FTP file watcher.
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
Monitors for file changes over an FTP session.
See Also