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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access