Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

FSEventsMBS.Constructor(DeviceToWatch as Integer, path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.4 Yes No No Yes, macOS only No
Function: Creates a new FS event stream object for a particular device with the given parameters.
Notes:
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:

Feedback, Comments & Corrections

FSEventsMBS.Constructor(DeviceToWatch as Integer, paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.4 Yes No No Yes, macOS only No
Function: Creates a new FS event stream object with the given parameters.
Notes:
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:

Feedback, Comments & Corrections

FSEventsMBS.Constructor(path as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Creates a new FS event stream object with the given parameters.
Notes:
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:

Feedback, Comments & Corrections

FSEventsMBS.Constructor(path as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.4 Yes No No Yes, macOS only No
Function: Creates a new FS event stream object with the given parameters.
Notes:
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:

Feedback, Comments & Corrections

FSEventsMBS.Constructor(paths() as folderitem, sinceWhen as UInt64, latency as Double, flags as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Creates a new FS event stream object with the given parameters.
Notes:
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:

Feedback, Comments & Corrections

FSEventsMBS.Constructor(paths() as string, sinceWhen as UInt64, latency as Double, flags as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.4 Yes No No Yes, macOS only No
Function: Creates a new FS event stream object for a particular device with the given parameters.
Notes:
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:

Feedback, Comments & Corrections

FSEventsMBS.Description as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Returns a string containing the description of the stream.
Notes: For debugging only.

Feedback, Comments & Corrections

FSEventsMBS.DeviceBeingWatched as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.4 Yes No No Yes, macOS only No
Function: Fetches the dev_t supplied when the stream was created using a Device ID.
Notes: Returns 0 if there was an error.

Feedback, Comments & Corrections

FSEventsMBS.ExclusionPaths as String()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 16.0 Yes No No Yes, macOS only No
Function: Queries exclusion paths.

Feedback, Comments & Corrections

FSEventsMBS.FlushAsync as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Flushes all events.
Notes:
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.

Feedback, Comments & Corrections

FSEventsMBS.FlushSync
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Flushes all events.
Notes: 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().

Feedback, Comments & Corrections

FSEventsMBS.GetLatestEventId as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Fetches the sinceWhen property of the stream.
Notes: 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.

Feedback, Comments & Corrections

FSEventsMBS.PathsBeingWatched as String()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns an array with the paths being watched.
Notes: Works only on the RB Versions which support arry creation in plugins.

Feedback, Comments & Corrections

FSEventsMBS.SetExclusionPaths(paths() as String) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 16.0 Yes No No Yes, macOS only No
Function: Sets the exclusion paths.
Notes:
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.

Feedback, Comments & Corrections

FSEventsMBS.Show
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Prints a description of the supplied stream to stderr.
Notes: For debugging only.

Feedback, Comments & Corrections

FSEventsMBS.Start as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Attempts to register with the FS Events service to receive events per the parameters in the stream.
Notes:
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.

Feedback, Comments & Corrections

FSEventsMBS.Stop
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Folder Change Watching MBS MacFrameworks Plugin 8.1 Yes No No Yes, macOS only No
Function: Unregisters with the FS Events service.
Notes: 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").

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacFrameworks Plugin.





Links
MBS Xojo Plugins