Hi Oliver,
Oliver Braun wrote:
Hi Joerg, hi Florian,
Florian Heckl wrote:
I haven't done any OSX development, but in older MAC OS versions
there used to be an API to locate a folder for storing preferences.
(FWIW: Later MS Windows added a similar API)
just found the reference we might need for this clean solution:
http://developer.apple.com/documentation/Carbon/Reference/Folder_Manager/Reference/reference.html
actually I am not very eager to use carbon functionality in sal,
especially since the API has dedicated input values for "Preferences"
and "Application Support".
I'd assume "Preferences" is a legacy location (that constant did exist
even in Mac OS 7). In that case OSX apps should use the newer
"Application Support" (and the OOo user directory contains more than
preferences anyhow).
BTW: Does either of them yield a location in the home directory instead
of a system one?
But I agree that osl_getConfigDir should probably return
~/Library[/whatever we decide on], even though I might go with
hardcoding the directory there.
But
<http://developer.apple.com/documentation/Cocoa/Conceptual/LowLevelFileMgmt/index.html#//apple_ref/doc/uid/10000055i>
certainly recommends aginst using hard-coded pathes. And
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html>
explicitly recommends FSFindFolder for C code - including new code.
As the Windows example shows, evolution of the system or other
considerations[*] may cause such locations to change. Using the
recommended API instead of a hardcoded path makes us do the right thing
going forward.
I'd still suggest using the API where available. We can be pretty
confident that this works, because we already use an API behind
osl_getConfigDir in Windows...
[*] Even though OSX has a saner approach to localizing the file system
(display names) than Windows, there are other reasons to relocate
special directories, for example special networked setups or 'roaming
profiles'.
Ciao, Jörg
--
Joerg Barfurth Sun Microsystems - Desktop - Hamburg
>>>>>>>>>>>>>>>>>> using std::disclaimer <<<<<<<<<<<<<<<<<<<<<<<
Software Engineer [EMAIL PROTECTED]
OpenOffice.org Configuration http://util.openoffice.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]