PDA

View Full Version : [SOLVED] Mono home directory



toogooda
April 16th, 2010, 02:36 AM
I am wanting to find out what the users home directory/folder is IE /home/andrew
In shell I usually use ~ but this does not seem to work using System.Diagnostics

Is there a way of finding out inside mono what the users linux/ubuntu home directory is?

SKLP
April 16th, 2010, 04:14 PM
Environment.GetFolderPath(Environment.SpecialFolde r.Personal)

Also you can use Environment.SpecialFolder.ApplicationData to get ~/.config on *nix, and also the correct dir on windows

toogooda
April 17th, 2010, 09:13 AM
Environment.GetFolderPath(Environment.SpecialFolde r.Personal)

Also you can use Environment.SpecialFolder.ApplicationData to get ~/.config on *nix, and also the correct dir on windows

Thanks works perfectly thank you very much!