• 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: Indexing/Directory Enumeration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indexing/Directory Enumeration


  • Subject: Re: Indexing/Directory Enumeration
  • From: Justin Spahr-Summers <email@hidden>
  • Date: Wed, 23 Feb 2005 16:16:57 -0600

He has multiple recursive directories, in which case a simple
NSDirectoryEnumerator wouldn't work, as it would only give the
contents of the directory you specify.

On Wed, 23 Feb 2005 09:46:02 -0800, Matt Neuburg <email@hidden> wrote:
> On Tue, 22 Feb 2005 19:46:25 -0500, Austin Sarner <email@hidden>
> said:
>
> >I'm pretty sure I will need to use an NSDirectoryEnumerator to go
> >through them all and create the objects and make the arrays to
> >represent it.  Is this the right approach?  And if so, can you give me
> >a nudge in the right direction.
>
> NSFileManager* dfm = [NSFileManager defaultManager];
> NSDirectoryEnumerator* e = [dfm enumeratorAtPath: folder];
> NSString* aFile;
>   while ((aFile = [e nextObject])) {
>     // add an entry to your data structure
>   }
>
> m.
 _______________________________________________
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: 
 >Re: Indexing/Directory Enumeration (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Re: Cocoa equivalent of AppleScript "choose folder" SOLVED
  • Next by Date: troublesome NSStepperCell
  • Previous by thread: Re: Indexing/Directory Enumeration
  • Next by thread: Re: Indexing/Directory Enumeration
  • Index(es):
    • Date
    • Thread