[Mono-osx] How to write files to (and read from) special folders
Miguel de Icaza
miguel at novell.com
Wed Dec 29 15:12:13 EST 2010
Hello,
I found a discussion on macworld.com
> (http://hintsforums.macworld.com/showthread.php?t=100909) that says that
> you never know the context before hand. It depends on the place your app
> was started. You should use "~/Library/Application
> Support/yourapplication". Does the MonoMac community agree?
>
Historically, Mono used the XDG standard for retrieving the parameters from
GetFolderPath, this might need to change, but wont be there any time soon
(best case scenario, we do this for Mono 2.10, but that is still 2 months
away).
You should for now use this to get your home directory:
Environment.GetFolderPath (Environment.SpecialFolder.Personal)
And then use Path.Combine (home, "Library", "Application Support",
"YourApplication")
To get the right path.
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101229/be81d471/attachment.html
More information about the Mono-osx
mailing list