Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Watching folders for new files and event handling based on that?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Watching folders for new files and event handling based on that? (From: Tim Perrett <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.