Platforms to show: All Mac Windows Linux Cross-Platform

Back to FSEventsMBS class.

FSEventsMBS.Available as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Whether the FSEvent functions are working.
Example
if FSEventsMBS.Available then
MsgBox "available"
else
MsgBox "not available"
end if

True on Mac OS X 10.5 and false on other versions and operation systems.

FSEventsMBS.GetAbsoluteTime(theDate as date) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates an absolute time value based on the system time zone and the values in the date object.
Example
dim d as new date

MsgBox str(FSEventsMBS.GetAbsoluteTime(d))

Returns 0 if the date parameter is nil or invalid.

See also:

FSEventsMBS.GetAbsoluteTime(theDate as DateTime) as double

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 20.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates an absolute time value based on the system time zone and the values in the date object.

Returns 0 if the date parameter is nil or invalid.

See also:

FSEventsMBS.GetCurrentEventId as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Fetches the most recently generated event ID, system-wide (not just for one stream).

By thetime it is returned to your application even newer events may have already been generated.

Some examples using this method:

FSEventsMBS.GetDeviceID(volume as folderitem) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the device ID for the volume the folderitem points to.
Example
dim v as FolderItem

v=volume(0)

MsgBox str(FSEventsMBS.GetDeviceID(v))

Returns 0 on any error.

FSEventsMBS.GetLastEventIdForDeviceBeforeTime(DeviceID as Integer, theTime as Double) as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Gets the last event ID for the given device that was returned before the given time.
Example
dim d as new date

MsgBox str(FSEventsMBS.GetLastEventIdForDeviceBeforeTime(1,d.TotalSeconds))

This is conservative in the sense that if you then use the returned event ID as the sinceWhen parameter of the constructor that you will not miss any events that happened since that time. On the other hand, you might receive some (harmless) extra events. Beware: there are things that can cause this to fail to be accurate. For example, someone might change the system's clock (either backwards or forwards). Or an external drive might be used on different systems without perfectly synchronized clocks.

FSEventsMBS.kFSEventStreamEventIdSinceNow as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 16.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A special value to pass in if you mean the event ID for now.

Returns &hFFFFFFFFFFFFFFFF.

Some examples using this method:

FSEventsMBS.PurgeEventsForDeviceUpToEventId(DeviceID as Integer, EventID as UInt64) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Purges old events from the persistent per-volume database maintained by the service.

Can only be called by the root user.

FSEventsMBS.UUIDForDevice(DeviceID as Integer) as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Folder Change Watching MBS MacFrameworks Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Gets the UUID associated with a device, or nil if not possible (for example, on read-only device).

A (non-nil) UUID uniquely identifies a given stream of FSEvents. If this (non-nil) UUID is different than one that you stored from a previous run then the event stream is different (for example, because FSEvents were purged, because the disk was erased, or because the event ID counter wrapped around back to zero). A nil return value indicates that "historical" events are not available, i.e., you should not supply a "sinceWhen" value to the constructor other than kFSEventStreamEventIdSinceNow.

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


The biggest plugin in space...