Re: Count files in directory
Re: Count files in directory
- Subject: Re: Count files in directory
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 13 Apr 2003 01:44:33 -0700
On Sunday, April 13, 2003, at 01:30 AM, Georges Engelmann wrote:
I dont think this is a specific cocoa question, but how can i count
the files in a directory.
I also need the name (and path) of each file counted.
NSArray *filesAtPath = [[NSFileManager defaultManager]
directoryContentsAtPath:@"/Insert/Your/Path/Here"];
int filesInDirectory = [filesAtPath count];
Please read the NSFileManager documentation. Thanks.
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page:
http://dreamless.home.attbi.com/
"Building the future and keeping the past alive are one and the same
thing." - Metal Gear Solid 2
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.