Вопрос

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