Re: Scanning directory contents
Re: Scanning directory contents
- Subject: Re: Scanning directory contents
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 5 May 2004 19:18:43 +0100
On 5 May 2004, at 6:35 pm, email@hidden wrote:
Quick question which is the best method to get directory contents:
NSFileManagers - directoryContentsAtPath or using a direcotryEnumerator
Depends what contents you want. -directoryContentsAtPath: doesn't
return the contents of subfolders, whereas NSDirectoryEnumerator does.
Question 2 is there an easy way to filter the invisible files out of
the scan?
I usually check for ![filename hasPrefix:@"."] when iterating through
the contents.
Regards,
-Jeremy
_______________________________________________
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.