Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/FSEvents/FSEvents on Boot Device


Required plugins for this example: MBS MacFrameworks Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacFrameworks/FSEvents/FSEvents on Boot Device

This example is the version from Fri, 12th Nov 2015.

Project "FSEvents on Boot Device.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control ListBox1 Inherits ListBox
ControlInstance ListBox1 Inherits ListBox
End Control
EventHandler Sub Close() f.stop End EventHandler
EventHandler Sub Open() dim eventid as UInt64 dim flags as integer dim latency as Double dim DeviceID as integer dim volume as FolderItem = volume(0) dim path as string = "" DeviceID=FSEventsMBS.GetDeviceID(volume) eventid=FSEventsMBS.GetCurrentEventId flags=FSEventsMBS.kFSEventStreamCreateFlagNone latency=1.0 f=new FSEvents(DeviceID, path, eventid, latency, flags) f.mypath=path // show description for debugging MsgBox f.Description // and on console (stderr) f.Show if not f.Start then MsgBox "Failed to start." end if End EventHandler
Property f As fsevents
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
Class FSEvents Inherits FSEventsMBS
EventHandler Sub Callback(index as integer, count as integer, path as string, flags as integer, eventID as UInt64) dim l as listbox l=window1.ListBox1 l.AddRow path l.Cell(l.LastIndex,1)=hex(flags) l.Cell(l.LastIndex,2)=hex(eventID) End EventHandler
Property mypath As string
End Class
End Project

See also:

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


The biggest plugin in space...