[Mono-list] How to get user's HOME directory
04 Apr 2003 23:34:55 +0200
I know that the name of the home directory can differ on Win32 systems,
it was only an example.
I agree with you, that this would be the best way:
But it does not work (Linux, mono 0.23) and most of the other
SpecialFolder constants does not work too. Could be a bug or the mono
people don't want to port it, because it's too Win32 specific.
Am Fre, 2003-04-04 um 23.22 schrieb Piers Haken:
> > -----Original Message-----
> > From: Stefan Saring [mailto:email@example.com]
> > Sent: Thursday, April 03, 2003 10:54 PM
> > To: Marcus
> > Cc: firstname.lastname@example.org
> > Subject: Re: [Mono-list] How to get user's HOME directory
> > Yes. On Windows2000 it's e.g. "C:\Documents and
> > Settings\USERNAME\". This is the place where many
> > applications store their user settings and profiles (e.g. Mozilla).
> This isn't necessarily true. Firstly the directory may not be on the
> 'C:' drive. Secondly, the string 'Documents and Settings' can be
> localized. And thirdly the subdirectory may not be the same as the
> username. If for any reason the directory exists (dual-boot,
> domain/local) then windows setup will pick a new name. In general, you
> shouldn't make assumptions about folder names in the user's profile, you
> should use the Environment.SPecialFolder enumeration instead.
Stefan Saring <email@example.com>