[erlang-questions] windows paths in filename module

Antoine Koener antoine.koener@REDACTED
Fri Nov 25 15:11:35 CET 2011

On Fri, Nov 25, 2011 at 3:05 PM, Tim Watson <watson.timothy@REDACTED>wrote:

> On 25 November 2011 13:56, Antoine Koener <antoine.koener@REDACTED>wrote:
>> If this really bugs you, note that windows doesn't really care about / or
>> \\
>> cd C:/Program Files/Putty gets you in the putty directory...
>> Shell completion (cmd.exe) may not work but, Win32 CreateFile works
>> flawlessly...
>> Then I would suggest that you don't have to bother with "nativename"
>> anymore
> I can live with that, but I do need filename:join to behave itself when
> the first path is a drive letter. My requirement is to locate the
> equivalent of the home directory on windows platforms. I'm currently
> checking for the %USERPROFILE% environment variable, and if this is missing
> I fall back to %HOMEDRIVE% \\ %HOMEPATH% and it was doing this that
> alerted me to this unexpected behaviour in the filename module.
> Is there a better way of locating the user's home/profile directory on
> windows platforms in general? I will happily use some other API if it's
> available.

May be the Registry :

then use the erlang module to query that key.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111125/d9984b45/attachment.htm>

More information about the erlang-questions mailing list