• 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: How to enumerate directory contents?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to enumerate directory contents?


  • Subject: Re: How to enumerate directory contents?
  • From: Paul Archibald <email@hidden>
  • Date: Thu, 21 Aug 2008 07:46:41 -0700

I did something like this:

NSString *file;
// Get all of the files in the source directory, loop thru them.
NSEnumerator *files = [[myFileMgr directoryContentsAtPath:srcDirectory] objectEnumerator];
while(file = [files nextObject] ) {
if( [[file pathExtension] isEqualToString:interestingExtension] ) {
// do something with file
}

}




Paul Archibald

"An ocean without its unnamed monsters
would be like a completely dreamless sleep."
— John Steinbeck





On Aug 19, 2008, at 10:06 PM, email@hidden wrote:

Re: How to enumerate directory contents?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to enumerate directory contents?
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: [moderator] Re: !foo vs foo == nil
  • Next by Date: [moderator] Re: !foo vs foo == nil
  • Previous by thread: Re: How to enumerate directory contents?
  • Next by thread: Re: How to enumerate directory contents?
  • Index(es):
    • Date
    • Thread