edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing
Click or drag to resize

FTPFileSystemWatcher Class

Raises events when files in the current remote directory are created, changed or deleted.
Inheritance Hierarchy

Namespace:  EnterpriseDT.Net.Ftp
Assembly:  edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 12.3.0.0
Syntax
public class FTPFileSystemWatcher : Component, 
	IFTPComponent

The FTPFileSystemWatcher type exposes the following members.

Constructors
  NameDescription
Public methodFTPFileSystemWatcher
Default consructor.
Top
Properties
  NameDescription
Protected propertyCanRaiseEvents
Gets a value indicating whether the component can raise an event.
(Inherited from Component.)
Public propertyConnection
Get or set the FTP connection object for which status information is being displayed.
Public propertyContainer
Gets the IContainer that contains the Component.
(Inherited from Component.)
Public propertyDelayPeriodSecs
Number of seconds to wait after a connection is established or the current directory is changed before requesting a directory listing.
Protected propertyDesignMode
Gets a value that indicates whether the Component is currently in design mode.
(Inherited from Component.)
Public propertyDirectoryPollingEnabled
Determines whether or not the server directory should be fetched periodically.
Public propertyEnableRaisingEvents
Enables generation of events.
Protected propertyEvents
Gets the list of event handlers that are attached to this Component.
(Inherited from Component.)
Public propertyPollingPeriodSecs
Number of seconds between consecutive directory listings.
Public propertySite
Gets or sets the ISite of the Component.
(Inherited from Component.)
Top
Methods
  NameDescription
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 methodDispose
Releases all resources used by the Component.
(Inherited from Component.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
(Inherited from Component.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
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 methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodLinkComponent
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 methodOnChanged
Protected methodOnCreated
Called when a file is created in the current remote directory.
Protected methodOnDeleted
Public methodToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component.)
Top
Events
  NameDescription
Public eventChanged
Notifies that the size and/or last-modified time of a file in the current remote directory has changed.
Public eventCreated
Notifies that a file has been created in the current remote directory.
Public eventDeleted
Notifies that a file has been deleted in the current remote directory.
Public eventDisposed
Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component.)
Top
Remarks

FTPFileSystemWatcher listens to FTPConnection events and (optionally) polls the FTP server every [!:RefreshPeriodSecs] to detect changes.

Three events are provided for notification of changes on the remote file:

EventTriggered when FTPFileSystemWatcher detects that..
Created...a file has been created on the server.
Changed...a file has been created on or uploaded to the server.
Deleted...a file has been deleted on the server.

See Also