|
|
| ProcessEnvironment (const ProcessEnvironment &)=delete |
| |
|
| ProcessEnvironment (ProcessEnvironment &&)=delete |
| |
|
ProcessEnvironment & | operator= (const ProcessEnvironment &)=delete |
| |
|
ProcessEnvironment & | operator= (ProcessEnvironment &&)=delete |
| |
| size_t | size () const |
| | Returns the total number of environment variables for current process.
|
| |
| bool | get (size_t index, StringSpan &name, StringSpan &value) const |
| | Get the environment variable at given index, returning its name and value.
|
| |
| bool | contains (StringSpan variableName, size_t *index=nullptr) const |
| | Checks if an environment variable exists in current process.
|
| |
| bool | get (StringSpan variableName, StringSpan &value) const |
| | Gets the value of an environment variable from current process.
|
| |
Reads current process environment variables.
Example: Print all environment variables to stdout
for (
size_t idx = 0; idx < environment.
size(); ++idx)
{
(void)environment.
get(idx, name, value);
{
report.console.printLine(name);
}
else
{
report.console.print(name);
report.console.print("=");
report.console.printLine(value);
}
}