Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / April 2006



Tip: Looking for answers? Try searching our database.

N00b needs help with NSDirectoryEnumerator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boris Schulz - 25 Apr 2006 03:19 GMT
Hi,

i would like to list all files in a diretory that are of an image type.
So I get myself a NSDirectoryEnumerator like this:
NSDirectoryEnumerator *enumerator = [fileManager enumeratorAtPath:
pictDirectory];
But how do I prevent subdirectories from beeing included? There is this
skipDescendents, but as it says on the apple homepage, it "causes the
receiver to skip recursion into the most recently obtained
subdirectory", so it seems I can only use this for one subdirectory, and
the last one only. But how Do I prevent the enumerator from going into
all subdirs?
If there is a way to include only files of a certain type, feel free to
tell me :-) I can do this part myself in my own code though.

Any help on the subdirectories would be of great help.

greets, B.S.
Patrick Machielse - 25 Apr 2006 10:12 GMT
> i would like to list all files in a diretory that are of an image type.
> So I get myself a NSDirectoryEnumerator like this:
> NSDirectoryEnumerator *enumerator = [fileManager enumeratorAtPath:
> pictDirectory];
> But how do I prevent subdirectories from beeing included?

you need -[NSFileManager directoryContentsAtPath:]

patrick
Boris Schulz - 25 Apr 2006 21:43 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.