• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Watching a file for changes.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Watching a file for changes.
      • From: Scott Ribe <email@hidden>
References: 
 >Watching a file for changes. (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Watching a file for changes.
  • Next by Date: Re: Watching a file for changes.
  • Previous by thread: Watching a file for changes.
  • Next by thread: Re: Watching a file for changes.
  • Index(es):
    • Date
    • Thread