tango.sys.Environment

License:

BSD style: see license.txt

Version:

Feb 2007: Initial release

Author:

Deewiant, Maxter, Gregor, Kris
struct Environment
Exposes the system Environment settings, along with some handy utilities
char[] toAbsolute(char[] path) [static]
Returns an absolute version of the provided path, where cwd is used as the prefix.
The provided path is returned as is if already absolute.
FilePath exePath(char[] file) [static]
Returns the full path location of the provided executable file, rifling through the PATH as necessary.
Returns null if the provided filename was not found
char[] get(const(char)[] variable, char[] def = null) [static]
Returns the provided 'def' value if the variable does not exist
void set(const(char)[] variable, const(char)[] value = null) [static]
clears the variable, if value is null or empty
char[][char[]] get() [static]
Get all set environment variables as an associative array.
void cwd(const(char)[] path) [static]
Set the current working directory
char[] cwd() [static]
Get the current working directory