Re: FindFolder() and Cocoa
Re: FindFolder() and Cocoa
- Subject: Re: FindFolder() and Cocoa
- From: Douglas Davidson <email@hidden>
- Date: Mon, 27 Jan 2003 11:31:54 -0800
On Monday, January 27, 2003, at 10:37 AM, chris corbell wrote:
Is there a fully-featured Cocoa equivalent for
FindFolder()?
No, there is no Cocoa-specific API that supports all of the features of
FindFolder(). You can certainly use FindFolder(), though.
The specific feature I'm working on involves writing
some xml files to an Application Support folder.
I've looked at NSWorkspace and NSPathUtilities and they
don't seem to include explicit support for all of the
possible folder types, e.g. Application Support, Documents,
etc. I don't want to simply append folder names to a known
path; I'm assuming a localized system would have different
folder names for some of these.
No, actually it wouldn't. This is a multi-localized system, so what is
localized is the presentation of names to the user--which may vary with
each user's localization preferences--rather than the underlying names
in the filesystem--which do not.
It is, of course, a good idea in general to avoid hard-coding paths,
but it is deemed acceptable to use NSPathUtilities to locate the user's
Library directory, for example, and append a subdirectory name to that.
Or you may use FindFolder(), as you seem to be doing.
Douglas Davidson
_______________________________________________
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.