I'm using FSEvents APIs to detect file system changes for backup application. Application creates a FSEvent stream on ROOT (/
) path. Now the problem starts if sombody removes a file via shell with different case/normalization. Let say if folder (/Users/bob) contains a file called a.txt
and user deletes it with A.TXT
, under this situation event will generate against path /Users/bob/A.TXT
rather than /Users/bob/a.txt
.
At this moment backup application has no clue about the case of deleted file (under HFS+ and APFS). From 10.13 onwards APFS is the default file-system for Mac devices and it preserve the normalization of file. So under APFS problem becomes more complex since application also clueless about the normalization of deleted file. In the developer docs I din’t find details about this. Ideally delete event should preserve the case and normalization of file.
Any insight on this is appreciated.