Platforms to show: All Mac Windows Linux Cross-Platform
Back to FSEventsMBS class.
FSEventsMBS.Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
In order to start receiving callbacks you must also call Start().
deviceToWatch:
A dev_t corresponding to the device which you want to receive notifications from. Use GetDeviceID to get such a device ID.
pathsToWatchRelativeToDevice:
A string, specifying a relative path to a directory on the device identified by the dev parameter. The path should be relative to the root of the device. For example, if a volume "MyData" is mounted at "/Volumes/MyData" and you want to watch "/Volumes/MyData/Pictures/July", specify a path string of "Pictures/July". To watch the root of a volume pass a path of "" (the empty string).
sinceWhen:
The service will supply events that have happened after the given event ID. To ask for events "since now" pass the constant kFSEventStreamEventIdSinceNow. Often, clients will supply the highest-numbered FSEventStreamEventId they have received in a callback, which they can obtain via the GetLatestEventId() accessor. Do not pass zero for sinceWhen, unless you want to receive events for every directory modified since "the beginning of time" -- an unlikely scenario.
latency:
The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its event. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks.
flags:
Flags that modify the behavior of the stream being created.
On success the handle property is not 0.
See also:
- Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
FSEventsMBS.Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
In order to start receiving callbacks you must also call Start.
paths: The folders you want to watch. (more exactly the root folders of the folder hierarchies you want to watch)
sinceWhen: The service will supply events that have happened after the given event ID. To ask for events "since now" pass the constant kFSEventStreamEventIdSinceNow. Often, clients will supply the highest-numbered FSEventStreamEventId they have received in a callback, which they can obtain via the GetLatestEventId() accessor. Do not pass zero for sinceWhen, unless you want to receive events for every directory modified since "the beginning of time" -- an unlikely scenario.
latency: The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its callback. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks and greater overall efficiency.
flags: Flags that modify the behavior of the stream being created.
See also:
- Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
FSEventsMBS.Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
In order to start receiving callbacks you must also call Start.
path: The folder you want to watch. (more exactly the root folder of the folder hierarchie you want to watch)
sinceWhen: The service will supply events that have happened after the given event ID. To ask for events "since now" pass the constant kFSEventStreamEventIdSinceNow. Often, clients will supply the highest-numbered FSEventStreamEventId they have received in a callback, which they can obtain via the GetLatestEventId() accessor. Do not pass zero for sinceWhen, unless you want to receive events for every directory modified since "the beginning of time" -- an unlikely scenario.
latency: The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its callback. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks and greater overall efficiency.
flags: Flags that modify the behavior of the stream being created.
See also:
- Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
FSEventsMBS.Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
In order to start receiving callbacks you must also call Start.
path: The folder you want to watch. (more exactly the root folder of the folder hierarchie you want to watch)
sinceWhen: The service will supply events that have happened after the given event ID. To ask for events "since now" pass the constant kFSEventStreamEventIdSinceNow. Often, clients will supply the highest-numbered FSEventStreamEventId they have received in a callback, which they can obtain via the GetLatestEventId() accessor. Do not pass zero for sinceWhen, unless you want to receive events for every directory modified since "the beginning of time" -- an unlikely scenario.
latency: The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its callback. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks and greater overall efficiency.
flags: Flags that modify the behavior of the stream being created.
See also:
- Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
FSEventsMBS.Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
In order to start receiving callbacks you must also call Start.
paths: The folders you want to watch. (more exactly the root folders of the folder hierarchies you want to watch)
sinceWhen: The service will supply events that have happened after the given event ID. To ask for events "since now" pass the constant kFSEventStreamEventIdSinceNow. Often, clients will supply the highest-numbered FSEventStreamEventId they have received in a callback, which they can obtain via the GetLatestEventId() accessor. Do not pass zero for sinceWhen, unless you want to receive events for every directory modified since "the beginning of time" -- an unlikely scenario.
latency: The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its callback. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks and greater overall efficiency.
flags: Flags that modify the behavior of the stream being created.
See also:
- Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
FSEventsMBS.Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
In order to start receiving callbacks you must also call Start().
deviceToWatch:
A dev_t corresponding to the device which you want to receive notifications from. Use GetDeviceID to get such a device ID.
pathsToWatchRelativeToDevice:
An array of strings, each specifying a relative path to a directory on the device identified by the dev parameter. The paths should be relative to the root of the device. For example, if a volume "MyData" is mounted at "/Volumes/MyData" and you want to watch "/Volumes/MyData/Pictures/July", specify a path string of "Pictures/July". To watch the root of a volume pass a path of "" (the empty string).
sinceWhen:
The service will supply events that have happened after the given event ID. To ask for events "since now" pass the constant kFSEventStreamEventIdSinceNow. Often, clients will supply the highest-numbered FSEventStreamEventId they have received in a callback, which they can obtain via the GetLatestEventId() accessor. Do not pass zero for sinceWhen, unless you want to receive events for every directory modified since "the beginning of time" -- an unlikely scenario.
latency:
The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its event. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks.
flags:
Flags that modify the behavior of the stream being created.
On success the handle property is not 0.
See also:
- Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
- Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
FSEventsMBS.Description as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
For debugging only.
FSEventsMBS.DeviceBeingWatched as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns 0 if there was an error.
FSEventsMBS.ExclusionPaths as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 16.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
FSEventsMBS.FlushAsync as UInt64
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Asks the FS Events service to flush out any events that have occurred but have not yet been delivered, due to the latency parameter that was supplied when the stream was created. This flushing occurs asynchronously -- do not expect the events to have already been delivered by the time this call returns. FlushAsync() can only be called after the stream has been started, via Start().
Returns The largest event id of any event ever queued for this stream, otherwise zero if no events have been queued for this stream.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Asks the FS Events service to flush out any events that have occurred but have not yet been delivered, due to the latency parameter that was supplied when the stream was created. This flushing occurs synchronously -- by the time this call returns, your callback will have been invoked for every event that had already occurred at the time you made this call. FlushSync() can only be called after the stream has been started, via Start().
FSEventsMBS.GetLatestEventId as UInt64
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Upon receiving an event (and just before invoking the client's callback) this attribute is updated to the highest-numbered event ID mentioned in the event.
Some examples using this method:
FSEventsMBS.PathsBeingWatched as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Works only on the RB Versions which support arry creation in plugins.
FSEventsMBS.SetExclusionPaths(paths() as String) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 16.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Sets directories to be filtered from the EventStream.
A maximum of 8 directories maybe specified.
Requires OS X 10.9 or newer.
Returns true on success or false on failure.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
For debugging only.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Once started, the stream can be stopped via Stop().
Returns true if it succeeds, otherwise False if it fails. It ought to always succeed, but in the event it does not then your code should fall back to performing recursive scans of the directories of interest as appropriate.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Folder Change Watching | MBS MacFrameworks Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The client callback will not be called for this stream while it is stopped. Stop() can only be called if the stream has been started, via Start(). Once stopped, the stream can be restarted via Start(), at which point it will resume receiving events from where it left off ("sinceWhen").
The items on this page are in the following plugins: MBS MacFrameworks Plugin.