c# - Using .files/.folders with Mono on Linux -


i'm writing c# application on linux, , i'd store applications .config files in user's home directory, i.e.

if application's name foo.exe

~user/.foo/foo.exe.config 

instead of looking .config file in same directory assembly. possible?

sure. environment.specialfolder.

string appdatadir = environment.getfolderpath(environment.specialfolder.applicationdata);

remember use path.combine(folder1, folder2) combine paths in order make app cross platform compatible.

alternatively environment variable home:

string homedir = system.environment.getenvironmentvariable("home");

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -