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