Re: Directory enumeration up to a certain depth
Re: Directory enumeration up to a certain depth
- Subject: Re: Directory enumeration up to a certain depth
- From: glenn andreas <email@hidden>
- Date: Sat, 3 Dec 2005 08:51:04 -0600
On Dec 3, 2005, at 7:51 AM, Arthur VIGAN wrote:
Hi,
I am trying to enumerate the content of a directory and its sub-
directories up to a certain depth. I am trying to use
NSDirectoryEnumerator, but with this there is no easy way to stop
when you are at a certain depth in the subdirectories. Is there an
good way to do what I want? does someone already has some code
doing it?
Thanks a lot in advance,
-- Arthur;
Just use NSDirectoryEnumerator, and when the number of components of
the path is returned by the enumerator's nextObject is at your limit
and it find a directory, call the enumerator's skipDescendents
method, and it wont traverse any deeper.
Glenn Andreas email@hidden
<
http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden