0

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??

urbanrider
  • 231
  • 5
  • 14
  • 1
    possible duplicate of [Cocoa Monitor a file for modifications](http://stackoverflow.com/questions/12343833/cocoa-monitor-a-file-for-modifications) – jscs Jan 11 '13 at 21:12
  • Have you looked at [File System Events](http://developer.apple.com/library/mac/#featuredarticles/FileSystemEvents/_index.html)? [FSEvents Reference Guide](http://developer.apple.com/library/mac/#documentation/Darwin/Reference/FSEvents_Ref/Reference/reference.html) – jscs Jan 11 '13 at 21:13

1 Answers1

0

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

urbanrider
  • 231
  • 5
  • 14