dmd.env
Functions for modifying environment variables.
License
Source:
env.d
Documentation: https://dlang.org/phobos/dmd_env.html
-
Declaration
nothrow boolputenvRestorable(const(char)[]name, const(char)[]value);Construct a variable from
andnameand put it in the environment while saving the previousvaluevalueof the environment variable into a global list so it can be restored later.Parameters
const(char)[]namethe
nameof the variableconst(char)[]valuethe
valueof the variableReturn Value
trueon error,falseon success -
Declaration
nothrow stringallocNameValue(const(char)[]name, const(char)[]value);Allocate a new variable via xmalloc that can be added to the global environment. The resulting string will be
null-terminated immediately after the end of the array.Parameters
const(char)[]namenameof the variableconst(char)[]valuevalueof the variableReturn Value
a newly allocated variable that can be added to the global environment
-
Declaration
voidrestoreEnvVars();Restore the original environment.
-
Declaration
nothrow voidsaveEnvVar(const(char)[]name);Save the environment variable
if not saved already.name