Efficiently iterating files on the iPhone
Efficiently iterating files on the iPhone
- Subject: Efficiently iterating files on the iPhone
- From: Dave DeLong <email@hidden>
- Date: Wed, 14 Apr 2010 13:39:21 -0600
Hi everyone,
I'm trying to find a fast and efficient way to iterate a folder on the iPhone. On the Mac, I'd create an FSIterator and use FSGetCatalogInfoBulk (so I can retrieve permissions, file type, resource/data fork size, etc). However, FSIterator and FSGetCatalogInfo* are part of the CoreServices framework, which doesn't appear to exist on the device (although it's in the simulator SDK).
If I have to, I can use the NSFileManager APIs, but then I'd have to grab the entire directory listing at once (instead of getting it in chunks), and then iteratively ask for each item's attributes. It seems rather inefficient, and I want to make this as efficient as possible. (NSFileManager also does not include resource forks)
Any suggestions on how I can iterate a directory and get file information at the same time?
Thanks,
Dave DeLong
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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