Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>File system event are persistent between launches. They are tracked by the file system itself, not the app. That is why you keep seeing the event every time you launch.</p> <p><strike>I believe you have to call <code>FSEventsPurgeEventsForDeviceUpToEventId</code> or the like to clear the events. </strike></p> <p>Take that with a grain of salt. I haven't fiddled with it much. </p> <h2>Edit:</h2> <p>From <a href="http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/FSEvents_ProgGuide/UsingtheFSEventsFramework/UsingtheFSEventsFramework.html#//apple_ref/doc/uid/TP40005289-CH4-DontLinkElementID_12" rel="nofollow noreferrer">File System Events Programming Guide</a>:</p> <blockquote> <p>To work with persistent events, your application should regularly store the last event ID that it processes. Then, when it needs to go back and see what files have changed, it only needs to look at events that occurred after the last known event. To obtain all events since a particular event in the past, you pass the event ID in the sinceWhen argument to FSEventStreamCreate or FSEventStreamCreateRelativeToDevice.] [On a per-device basis, you can also easily use a timestamp to determine which events to include. To do this, you must first call FSEventsGetLastEventIdForDeviceBeforeTime to obtain the last event ID sinceWhen argument to FSEventStreamCreateRelativeToDevice.</p> </blockquote> <p>I think the important thing to remember is that the file system events are not actually stored or even related to app that is observing them. They exist independently of the app in the file system itself. In practice, several different apps could be set to observe the same event.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload