Re: Indexing/Directory Enumeration
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