Re: Watching folders for new files and event handling based on that?
Re: Watching folders for new files and event handling based on that?
- Subject: Re: Watching folders for new files and event handling based on that?
- From: "Philip Q" <email@hidden>
- Date: Sat, 11 Aug 2007 21:02:31 +1200
On 11/08/07, Tim Perrett <email@hidden> wrote:
> Is there any support within the cocoa frameworks for watching folders
> for new files being added and so forth?
> I've had a search around the list but there don't seem to be any
> solutions to this and was wondering what methods people have taken to
> get this kind of functionality?
>
If the folders are being indexed by Spotlight, you can use
NSMetadataQuery---restrict it to a specific set of folders, set a
predicate to look for newly created files, and you'll get nice Cocoa
notifications back from it.
-Phil
_______________________________________________
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