Recursive search for files
Recursive search for files
- Subject: Recursive search for files
- From: James Merkel <email@hidden>
- Date: Sun, 22 May 2011 20:00:30 -0700
I would like to add a capability to an application to search
directories and sub-directories eventually opening all image files
(basically using NSDirectoryEnumerator).
Obviously, I can't allow the user to start at say the volume level and
do the search. However as far as I can tell, there is nothing in
NSOpenPanel for example that prevents the user from starting there. I
was trying to come up with a way to prevent the user from starting at
the wrong place. (Putting up an Alert that says you can't start
there). There's a method in the NSFileManager class called
isDeletableFileAtPath. I am thinking that all of those volumes and
higher level directories that I want to avoid are not deletable.
Therefore I could use this as a filter. The only other approach might
be to limit the search to a certain depth (maybe 10 or 20
directories). However that seems kind of mickey-mouse. Should I be
looking at the lower level File Manager Reference for some help here?
Has anyone come up with an approach for this?
Thanks,
Jim Merkel
_______________________________________________
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