IMO a backup application shouldn’t be using the file-level tracking in FSEvents (that is, not use
kFSEventStreamCreateFlagFileEvents). Rather, stick with directory level events and then compare the directories to calculate the differences. That comparison will have to take into account the different case and normalisation behaviours on the source volume and the destination backup store. This can be quite tricky, especially if the capabilities of the backup store don’t match the capabilities of the source volume.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
kFSEventStreamCreateFlagFileEvents doesn’t serve the purpose since calculation of hierarchy difference leads to increase in CPU, memory and disk IO consumption. Consider a case where directory consist of thousands/millions of files and directories, so single change in immediate child of that directory requires hefty computation.
I observe case and normalization are preserved for operation other than delete. So why behavior is different for file/folder delete event? It seems while accumulating events, paths are getting normalized except this case.