How to listen for file system changes MAC - kFSEventStreamCreateFlagWatchRoot
问题 I am listening for Directory and disk changes in a Cocoa project using FSEvents . I need to get events when a root folder is renamed or deleted. So, I passed kFSEventStreamCreateFlagWatchRoot while creating the FSEventStream . But even if I delete or rename the root folder I am not getting corresponding FSEventStreamEventFlags . Any idea what could possibly be the issue. I am listening for changes in a USB mounted device. I used both FSEventStreamCreate and FSEventStreamCreateRelativeToDevice