On Sat, Nov 22, 2008 at 12:55 PM, Christopher Wright <[EMAIL PROTECTED]> wrote: > Hey all, > > How do I get environment variables in a D program? I specifically want the > path to a user's home folder. > > Ta muchly. >
In Tango, there's tango.sys.Environment (http://www.dsource.org/projects/tango/docs/current/tango.sys.Environment.html) which provides a nice interface to environment variables. In Phobos, I think you have to use the C functions to get at environment variables, but std.path.expandTilde can be abused to get the home folder ;)