• 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: Scanning directory contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Scanning directory contents (From: email@hidden)

  • Prev by Date: Re: NSApplicationMain const warning
  • Next by Date: Re: NSApplicationMain const warning
  • Previous by thread: Scanning directory contents
  • Next by thread: Re: Uninstalling an app
  • Index(es):
    • Date
    • Thread