Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get folder (not file), then read all files from folder?



Once you get the FSRef (don't use FSSpecs, they have gone the way of the Doa-Doa) from the Nav dialog, check out the FSCopyObject sample code on Apple's web site

http://developer.apple.com/samplecode/FSCopyObject/

It will show you how to iterate over a given directory via FSGetCatalogInfoBulk.

Good luck...

On Apr 24, 2008, at 12:50 PM, Keith Wiley wrote:

I know how to use NavCreateChooseFolderDialog to get a folder and then, with some finangling, construct the generic FSSpec of a file in that that folder. I have used this to save multiple files into a folder of the user's choosing by filling in the generic FSSpec's filename parameter for each file to save. However, what I want to do now is let the user select a folder, not for writing, but for reading, and then to automatically read all the files out of that folder. I know how to do a multi-file select and loop through the files with AEGetNthPtr, but for this application, I would really rather let the user specify the folder instead of doing a multi-file open.

Any ideas?

Thanks.

________________________________________________________________________
Keith Wiley       email@hidden        http://www.cs.unm.edu/~kwiley

"What I primarily learned in grad school is how much I *don't* know.
Consequently, I left grad school with a higher ignorance to knowledge
ratio than when I entered."
                                          --  Keith Wiley
________________________________________________________________________

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Get folder (not file), then read all files from folder? (From: Keith Wiley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.