[Mono-list] Right application data folder

Michael Hutchinson m.j.hutchinson at gmail.com
Tue Sep 14 14:54:25 EDT 2010


2010/9/14 "José A. Salvador Vanaclocha" <joansava at gmail.com>:
> Hi all,
>
> I am wondering what is the right place (folder) to store the application
> data
>
> The goal is to use the Environment.GetFolderPath(... facility in order
> to get good crossplatform behavior, however, if I use
> Environment.SpecialDolder.ApplicationData, in my Debian system, the
> folder is .config. I dont know if it is the best place when the most
> linux's applications store their application data files in a folder
> begining with .application_name.
>
> What is the best way to choose the right application data folder?

~/.config is the correct folder for modern apps that follow the XDG
spec. You should use a subdirectory in that folder for your app's
data, e.g.

var appDataDir = Path.Combine (Environment.GetFolderPath
(Environment.SpecialFolder.ApplicationData), applicationName);

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Mono-list mailing list