History

FSEvents keeps a history of these directory changes and stores them in a database of sorts at the top of each device in a directory named .fseventsd. If you want to prevent the accumulation of this change history, say for security reasons or general paranoia, create an empty file called no_log in this directory.

Because each device keeps a history of changes, an application can be notified of events that have happened since the last time the program was run. Only directory changes are kept, so this database is fairly small. You can ask FSEvents Hey, what happened since this last event I saw? or Hey, what happened since last Tuesday? Your application can even crash and then pick up from the last event ID that it remembers seeing. ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.