TCnFileSystemWatcher Class

Listens to the file system change notifications and raises events when a directory, or file in a directory, changes.

Namespace: CNClrLib.Component.FileSystemWatcher
TComponent
  CNClrLib.Control.Base.TClrBaseComponent
    CNClrLib.Component.FileSystemWatcher.TCnFileSystemWatcher
type
 TCnFileSystemWatcher = class(TClrBaseComponent)
 end;

The TCnFileSystemWatcher type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates and initializes a TCnFileSystemWatcher instance. (Overrides TClrBaseComponent.Create(TComponent).)

Destroy

Frees the resources allocated with a TCnFileSystemWatcher instance. (Overrides TClrBaseComponent.Destroy.)

Top
Show:
 NameDescription
DefaultClrObject

Get the common language runtime object interface for this component. (Inherited from TClrBaseComponent.)

EnableRaisingEvents

Gets or sets a value indicating whether the component is enabled.

Filter

Gets or sets the filter string used to determine what files are monitored in a directory.

IncludeSubdirectories

Gets or sets a value indicating whether subdirectories within the specified path should be monitored.

InternalBufferSize

Gets or sets the size (in bytes) of the internal buffer.

NotifyFilter

Gets or sets the type of changes to watch for.

Path

Gets or sets the path of the directory to watch.

SynchronizingObject

Gets or sets the object used to marshal the event handler calls issued as a result of a directory change.

Top
Show:
 NameDescription
BeginInit

Begins the initialization of a FileSystemWatcher used on a form or used by another component. The initialization occurs at run time.

Dispose

Releases the resources used by the Component. (Inherited from TClrBaseComponent.)

DoGetDefaultClrObject

Represents method DoGetDefaultClrObject. (Inherited from TClrBaseComponent.)

DoGetDotNetBaseComponent

Represents method DoGetDotNetBaseComponent. (Overrides TClrBaseComponent.DoGetDotNetBaseComponent.)

EndInit

Ends the initialization of a FileSystemWatcher used on a form or used by another component. The initialization occurs at run time.

GetClrObject

Represents method GetClrObject. (Inherited from TClrBaseComponent.)

RegisterEventCallBack(ClrWString,Pointer)

Add an event to the instance using the specified event name and function pointer which is the event handler. The RegisterEventCallBack method does not directly add the event handler to the event. A hooking mechanism is used such that if the event is fired, the hook event is also fired which in turn calls the function pointer. (Inherited from TClrBaseComponent.)

RegisterEventSource

Register the Delphi object which will raise the .Net event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventCallBack(ClrWString,Pointer)

Remove an event from the instance using the specified event name and function pointer which is the event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventSource

Unregister the Delphi object which raised the .Net event handler. (Inherited from TClrBaseComponent.)

WaitForChanged(TWatcherChangeTypes_Set)

Overloaded. A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor.

WaitForChanged(TWatcherChangeTypes_Set,Integer)

Overloaded. A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor and the time (in milliseconds) to wait before timing out.

Top
Show:
 NameDescription
OnChanged

Occurs when a file or directory in the specified Path is changed.

OnCreated

Occurs when a file or directory in the specified Path is created.

OnDeleted

Occurs when a file or directory in the specified Path is deleted.

OnError

Occurs when the instance of CnFileSystemWatcher is unable to continue monitoring changes or when the internal buffer overflows.

OnRenamed

Occurs when a file or directory in the specified Path is renamed.

Top

See C:\Users\Public\Documents\CrystalNet Technologies\.Net VCL for Delphi Demo Folder after installation for examples of how to use this component.