سؤال

So I want to monitor a single file and as far as I can tell KQueue is the way to do it in Cocoa. I have a partially functioning FSEvents code running, but that monitors the whole folder.

Can anyone recommend a good Cocoa wrapper that I might use to monitor when a file is altered? Preferably something along the lines it receiving the file path, then a block of code is run when it senses a change.

Any suggestions would be appreciated.

I'm also surprised cocoa doesn’t have something like this built in??

هل كانت مفيدة؟

المحلول

I ended up going with VDKQueue, an updated version of UKKQueue

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top