Re: Using Spotlight to watch for file change
Re: Using Spotlight to watch for file change
- Subject: Re: Using Spotlight to watch for file change
- From: Rosyna <email@hidden>
- Date: Wed, 14 Sep 2005 22:13:16 -0700
Use kqueue.
There is some very, very good sample code at
http://developer.apple.com/samplecode/FileNotification/FileNotification.html
Note that this won't work for file changes that don't go through the
kernel such as files changing on network volumes from a computer that
isn't the one with the code running on it (this is the same
limitation that spotlight has, of course).
Ack, at 9/14/05, Tim Gogolin said:
I'd like to watch one or more specific files to see if an external
program has modified them.
Three methods immediately pop to my mind:
kqueue (which I know almost nothing about),
Spotlight (which seems like it ought to be the right answer)
polling the file mod date (which I'd like to avoid)
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden