FSEvents:kFSEventStreamCreateFlagWatchRoot 标志:未获得 'root rename' 个事件

FSEvents: kFSEventStreamCreateFlagWatchRoot flag: not getting 'root rename' events

我正在创建 FSEvents 流并传递 kFSEventStreamCreateFlagWatchRoot 标志。来自 Apple 的 documentation

kFSEventStreamCreateFlagWatchRoot : Request notifications of changes along the path to the path(s) you're watching. For example, with this flag, if you watch "/foo/bar" and it is renamed to "/foo/bar.old", you would receive a RootChanged event. The same is true if the directory "/foo" were renamed. The event you receive is a special event: the path for the event is the original path you specified, the flag kFSEventStreamEventFlagRootChanged is set and event ID is zero.

所以当“/foo/bar”重命名为“/foo/bar.old”时,我得到了预期的事件。但是当“/foo”目录被重命名时,我没有得到我应该得到的事件。可能的原因是什么?

这是 OS X 中的一个已知 "FSEvents" 错误:http://www.openradar.me/8342264