Click or drag to resize

GH_FileWatcher Class

Provides easy mechanisms to monitor changes to the local File System.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_FileWatcher

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_FileWatcher : IDisposable

The GH_FileWatcher type exposes the following members.

Properties
  NameDescription
Public propertyActive
Gets or sets the active flag on this watcher.
Public propertyBuffer
Gets or sets the time during which events are buffered. If multiple events for the same file occur within the buffered timespan, they will be merged into one event.
Public propertyInvokeOnDefaultThread
Gets or sets invoke behaviour for events. If true, then the event delegate is called via the Grasshopper main UI thread. This is almost always what you need.
Public propertyIsDisposed
Public propertyPath
Gets the file or folder path currently being watched.
Top
Methods
  NameDescription
Public methodStatic memberCreateDirectoryWatcher(String, String, GH_FileWatcherEvents, GH_FileWatcherFileChanged)
Create a new FileSystem Watcher object aimed at a specific file.
Public methodStatic memberCreateDirectoryWatcher(String, String, GH_FileWatcherEvents, GH_FileWatcherFileChangedSimple)
Create a new FileSystem Watcher object aimed at a specific file.
Public methodStatic memberCreateFileWatcher(String, GH_FileWatcherEvents, GH_FileWatcherFileChanged)
Create a new FileSystem Watcher object aimed at a specific file.
Public methodStatic memberCreateFileWatcher(String, GH_FileWatcherEvents, GH_FileWatcherFileChangedSimple)
Create a new FileSystem Watcher object aimed at a specific file.
Public methodDispose
Releases all resources used by the GH_FileWatcher
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the GH_FileWatcher and optionally releases the managed resources
Public methodSetCustomUIThread(Control)
If you want to override the default Invoke behaviour, you must set InvokeOnDefaultThread to False and supply either a custom Control or a Form.
Public methodSetCustomUIThread(Form)
If you want to override the default Invoke behaviour, you must set InvokeOnDefaultThread to False and supply either a custom Control or a Form.
Top
See Also