Re: Files in a directory.
Re: Files in a directory.
- Subject: Re: Files in a directory.
- From: Chris Hanson <email@hidden>
- Date: Tue, 24 Feb 2004 07:53:46 -0500
On Feb 24, 2004, at 2:06 AM, Amit Sadana wrote:
I would like to find out the list of file names (in some NSArray) in a
given directory through my Cocoa -ObjC. This is similar to what an
"ls"will do at command prompt.
How can I do this?
Launch Cocoa Browser or another of the free Cocoa documentation
viewers. (Use Google to find them.)
Look at the classes in Foundation, since you're not doing anything with
your application's human interface. (If that were the case, you'd look
at the classes in AppKit.)
Read the names of the methods that belong to the various classes with
"File" in their names. You'll find something that does what you want.
This is what I do all the time for anything I don't yet have memorized.
(And for some stuff I do... I confuse prepositions occasionally --
"with" instead of "for" and so on.)
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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.