0

I'm developing an application that listens to file system events to update its state. File system events do not occur for all volumes, particularly network volumes and some removable drives don't seem to support this. Is there a way to programatically determine (using apple api) if for a given volume file system events are provided?

Thanks

user1573546
  • 523
  • 5
  • 13
  • Whilst the [question here](http://stackoverflow.com/questions/33543375/how-can-i-get-notifications-that-a-file-is-being-read-on-os-x/33545546#33545546) concerns reading a file, the Vnode scope will provide notification of any type of file access. Does that help? – TheDarkKnight Dec 03 '15 at 16:23
  • No, I was actually looking for a way to determine if FSEvents will be fired for a given volume. I don't see how the kernel extension will work for network volumes being manipulated by other users, so I will have to live with cases where I don't get events but I need to know for which volumes that is the case. But thanks for the pointer. I think it may help me in other cases. – user1573546 Dec 05 '15 at 11:47
  • If a volume is mounted, it appears in the /Volumes folder, which means that any access to a file would cause the Kernel Authorization system to be notified, along with any Kext which listens to the Vnode or File scopes. Your question never mentioned access to network files by other users. If you want to know if a network file is being accessed from other machines, that's a totally different question. – TheDarkKnight Dec 07 '15 at 09:43
  • Thanks, your last comment helped a lot. So I don't need to know that because it's really simpler. All modifications from that machine will be reported, regardless of the type of volume and for network drives these mechanisms do not work if modifications occur from other machines mounting that drive. – user1573546 Dec 08 '15 at 16:32

0 Answers0