Properties
Buffer
#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.
InvokeOnDefaultThread
#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.
Methods
CreateDirectoryWatcher
#Create a new FileSystem Watcher object aimed at a specific file.
public static GH_FileWatcher CreateDirectoryWatcher()
folderPath,
Folder to watch.
filter,
Filter string for filenames.
events,
Events to watch for.
delegate
Callback delegate.
Returns: A new filewatcher aimed at the specified folder.
CreateDirectoryWatcher
#Create a new FileSystem Watcher object aimed at a specific file.
public static GH_FileWatcher CreateDirectoryWatcher()
folderPath,
Folder to watch.
filter,
Filter string for filenames.
events,
Events to watch for.
delegate
Callback delegate.
Returns: A new filewatcher aimed at the specified folder.
CreateFileWatcher
#Create a new FileSystem Watcher object aimed at a specific file.
public static GH_FileWatcher CreateFileWatcher()
filePath,
File to watch.
events,
Events to watch for.
delegate
Callback delegate.
Returns: A new filewatcher aimed at the specified file.
CreateFileWatcher
#Create a new FileSystem Watcher object aimed at a specific file.
public static GH_FileWatcher CreateFileWatcher()
filePath,
File to watch.
events,
Events to watch for.
delegate
Callback delegate.
Returns: A new filewatcher aimed at the specified file.
Dispose
#public void Dispose()
SetCustomUIThread
#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 void SetCustomUIThread()
Control
target
GUI target object which will be used for Invoking File System Events.