Re: Any ~/Sites/ equivalent of NSDocumentDirectory?
Re: Any ~/Sites/ equivalent of NSDocumentDirectory?
- Subject: Re: Any ~/Sites/ equivalent of NSDocumentDirectory?
- From: Dustin Voss <email@hidden>
- Date: Sun, 31 Aug 2003 10:00:32 -0700
On Saturday, August 30, 2003, at 05:23 PM, Michael Mulligan wrote:
I'm trying to make an application that needs to copy some files into
the
~/Sites directory and so I'm trying to search the domain for the Sites
directory rather than hard-coding a path (a la
http://developer.apple.com/documentation/Cocoa/Conceptual/
LowLevelFileMgmt/T
asks/LocatingDirectories.html).
However, there's one problem: there doesn't seem to be any constant
that
represents the Sites folder (like there is to represent the Documents
folder
using NSDocumentDirectory). Did I miss something? Or should I just
hard-code
"Sites" (won't this not work for international users or is the folder
named
"Sites" there as well?)?
Use Carbon's FSFindFolder. Pass a vRefNum of kUserDomain and a
folderType of kInternetSitesFolderType. Convert the resulting FSRef to
a path with FSRefMakePath.
FSFindFolder is documented in
<
http://developer.apple.com/documentation/Carbon/Reference/
Folder_Manager/index.html>.
FSRefMakePath is documented in
<
http://developer.apple.com/documentation/Carbon/Reference/
File_Manager/index.html>
_______________________________________________
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.