Re: Watching a file for changes.
Re: Watching a file for changes.
- Subject: Re: Watching a file for changes.
- From: Felix Franz <email@hidden>
- Date: Wed, 20 Mar 2013 16:34:48 +0100
On 20.03.2013, at 16:23, Mr. Gecko <email@hidden> wrote:
> How can I watch for file changes? E.G. I open a file in Text Edit, I change the file by adding a few words, I save the file. After the file is saved, I'll like to know it was saved.
>
> I need to know how to do this both in 10.8 and 10.4. E.G. For directories in 10.8, I use FSEventStreamCreate. For directories in 10.4, I use FNSubscribeByPath.
You can use kqueue or some wrapper like UKKQueue (http://zathras.de/angelweb/sourcecode.htm)
or VDKQueue (https://github.com/bdkjones/vdkqueue). I think kqueue is available in 10.4, but
better check for yourself.
Cheers,
Felix
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden