FROM : Douglas Davidson
DATE : Mon Jan 27 20:31:54 2003
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_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.
DATE : Mon Jan 27 20:31:54 2003
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_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 mails | Author | Date |
|---|---|---|
| chris corbell | Jan 27, 19:37 | |
| Douglas Davidson | Jan 27, 20:31 | |
| Finlay Dobbie | Jan 27, 20:46 | |
| Erik M. Buck | Jan 27, 23:26 | |
| Daniel Jalkut | Jan 28, 16:25 | |
| chris corbell | Jan 28, 21:07 | |
| Daniel Jalkut | Jan 31, 04:43 |






Cocoa mail archive

