I have a file path to a specific file and I want to register to be notified whenever that file changes (its contents have been modified).
I have tried searching google and I can’t find a clear answer. I have experimented with kqueue and NSWorkspace but have not had much success.
What is the proper way to do this?
Thanks!
I am using VDKQueue right now – author says it’s a refactored and more performant version of UKKQueue.
Implementation was pretty straightforward:
VDKQueueDelegate;VDKQueue*ivar / property;VDKQueue:receivedNotification:forPath:;addPath:notifyingAbout:.Then just do your business in the delegate method.