-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When a file is moved and we're using the native FSEvents API on macOS, it issues native events with flag ITEM_RENAMED
set, but not flags ITEM_CREATED
or ITEM_REMOVED
. Typical cases include:
- Moving a file within the watch scope. In this case, there are two native events: one for the source (logically: delete), and one for the destination (logically: create).
- Moving a file into the watch scope. In this case, there is one native event, for the destination (logically: create).
- Moving a file out of the watch scope. In this case, there is one native event, for the source (logically: delete).
Because flags ITEM_CREATED
and ITEM_REMOVED
aren't set, the native events in cases 2 and 3 are indistinguishable. Currently, this is solved by asking the file system if the file exists: if it does, we assume it's case 2; if it doesn't, we assume it's case 3. However, this can be inaccurate (because things can have happened to the file between the native event was issued and asking the file system). A more accurate approach could be to maintain our own index.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request