Skip navigation.
 
mlRe: FindFolder() and Cocoa
FROM : Daniel Jalkut
DATE : Tue Jan 28 16:25:47 2003

On Monday, January 27, 2003, at 02:26  PM, Erik M. Buck wrote:

> Is there a problem with NSSearchPathForDirectoriesInDomains() ?
>
> See
> http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/
> Programmin
> gTopics/LowLevelFileMgmt/Tasks/LocatingDirectories.html
>
> Apple's documentation mentions FSFindFolder() on the same page. Is 
> there any
> reason to prefer one over the other ?
>


Probably just depends on how you're "used to getting things done". 
Being more familiar with FindFolder, I will speak to some of its 
advantages/differences.  I'm sure the traditional NS "way" has some 
good ones, too. FindFolder is much more specific about what directory 
in particular you are looking for (I mean, there are simply many more 
"constants" defined for passing to FindFolder).  So for those who are 
concerned with not "hard-coding" a path, the FindFolder approach can 
eliminate almost of all of that for even some of the lesser used folder 
types. Take a look in Folders.h (CoreServices) for a listing of what's 
available.

You can use FindFolder to find some folders within the configured 
"Classic" Mac OS 9 folder ("classic domain").  As far as I know it's 
the only API which provides a service like that.

Finally FindFolder has an option for creating the folder if it doesn't 
exist, and upon creating certain folders, will make certain adjustments 
to them (make them invisible, change permissions, etc) as appropriate 
for the folder type..  As far as I know the NS API is purely 
exploratory (probably for the best, IMO).

Daniel
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlFindFolder() and Cocoa chris corbell Jan 27, 19:37
mlRe: FindFolder() and Cocoa Douglas Davidson Jan 27, 20:31
mlRe: FindFolder() and Cocoa Finlay Dobbie Jan 27, 20:46
mlRe: FindFolder() and Cocoa Erik M. Buck Jan 27, 23:26
mlRe: FindFolder() and Cocoa Daniel Jalkut Jan 28, 16:25
mlRe: FindFolder() and Cocoa chris corbell Jan 28, 21:07
mlRe: FindFolder() and Cocoa Daniel Jalkut Jan 31, 04:43