Platforms to show: All Mac Windows Linux Cross-Platform

Back to FSEventsMBS class.

FSEventsMBS.Callback(index as Integer, count as Integer, path as string, flags as Integer, eventID as UInt64)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Folder Change Watching MBS MacFrameworks Plugin 8.1 ✅ Yes ❌ No ❌ No ❌ No
The callback received when something changed.

The plugin receives count events. This event is called count times with index going from 0 to count-1.
Path is the unix file path for the folder. A path might be "/" if either of these flags is set for the event: kFSEventStreamEventFlagUserDropped, kFSEventStreamEventFlagKernelDropped.
Flags: Flags to specify why the event was called. If no flags are set, then there was some change in the directory at the specific path supplied in this event.
eventID: The event ID for this change. Each event ID comes from the most recent event being reported in the corresponding directory named in the path parameter. Event IDs all come from a single global source. They are guaranteed to always be increasing, usually in leaps and bounds, even across system reboots and moving drives from one machine to another. Just before invoking your callback your stream is updated so that calling the accessor GetLatestEventId() will return the largest of the values passed in the eventIds parameter; if you were to stop processing events from this stream after this callback and resume processing them later from a newly-created FSEventStream, this is the value you would pass for the sinceWhen parameter to constructor.

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


The biggest plugin in space...