아무리 뒤져봐도 파일열기는 찾지를 못하겠네요 ㅠㅠ
FSEvent도 GCD에서도 파일을 열때 이벤트를 받아올 수 있는 방법을 아시는 분~~
enum {
kFSEventStreamEventFlagNone = 0x00000000, kFSEventStreamEventFlagMustScanSubDirs = 0x00000001, kFSEventStreamEventFlagUserDropped = 0x00000002, kFSEventStreamEventFlagKernelDropped = 0x00000004, kFSEventStreamEventFlagEventIdsWrapped = 0x00000008, kFSEventStreamEventFlagHistoryDone = 0x00000010, kFSEventStreamEventFlagRootChanged = 0x00000020, kFSEventStreamEventFlagMount = 0x00000040, kFSEventStreamEventFlagUnmount = 0x00000080 , /* These flags are only set if you specified the FileEvents */ /* flags when creating the stream.*/ kFSEventStreamEventFlagItemCreated = 0x00000100, kFSEventStreamEventFlagItemRemoved = 0x00000200, kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400, kFSEventStreamEventFlagItemRenamed = 0x00000800, kFSEventStreamEventFlagItemModified = 0x00001000, kFSEventStreamEventFlagItemFinderInfoMod = 0x00002000, kFSEventStreamEventFlagItemChangeOwner = 0x00004000, kFSEventStreamEventFlagItemXattrMod = 0x00008000, kFSEventStreamEventFlagItemIsFile = 0x00010000, kFSEventStreamEventFlagItemIsDir = 0x00020000, kFSEventStreamEventFlagItemIsSymlink = 0x00040000 };
https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/#//apple_ref/doc/constant_group/FSEventStreamEventFlags
fs_usage 소스를 보면 system_call로 구현이 되는듯한데, C를 잘 못해서 뭐가 어케 돌아가는지 어렵네요 ㅠㅠ