• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Directory enumeration up to a certain depth
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Directory enumeration up to a certain depth (From: Arthur VIGAN <email@hidden>)

  • Prev by Date: Directory enumeration up to a certain depth
  • Next by Date: Releasing all nib objects [Was: instantiateNibWithOwner:topLevelObjects: usage]
  • Previous by thread: Directory enumeration up to a certain depth
  • Next by thread: c arrays in objC
  • Index(es):
    • Date
    • Thread