Standard Library
class SystemEnv
The real process environment behind the IEnv interface.
since 0.1.0-alpha.1linuxwindows
- bases
IEnv
Examples
IEnv e = SystemEnv();
console.writeln(e.args().length() >= 1);
console.writeln(e.variable("LEVIATHAN_DOCS_UNSET_VARIABLE") == None);
true
true
Methods
args
args() -> Array<string>The real command-line arguments, with the program name first.
Returns
The program name followed by its arguments.
Examples
SystemEnv e = SystemEnv();
console.writeln(e.args().length() >= 1);
true
See also: args
variable
variable(string name) -> string | NoneRead a real environment variable.
Parameters
- name
- The name of the variable.
Returns
The value, or None when the variable is not set.
Examples
SystemEnv e = SystemEnv();
console.writeln(e.variable("LEVIATHAN_DOCS_UNSET_VARIABLE") == None);
true
See also: get