Env
An environment holds the command line and other values injected into the program by default by the runtime.
class val Env
Constructors
create
Build an artificial environment. A root capability may be supplied.
new val create( root': (AmbientAuth val | None val), input': InputStream tag, out': OutStream tag, err': OutStream tag, args': Array[String val] val, vars': Array[String val] val, exitcode': {(I32)} val) : Env val^
Parameters
- root': (AmbientAuth val | None val)
- input': InputStream tag
- out': OutStream tag
- err': OutStream tag
- args': Array[String val] val
- vars': Array[String val] val
- exitcode': {(I32)} val
Returns
- Env val^
Public fields
let root: (AmbientAuth val | None val)
The root capability.
Can be None
for artificially constructed Env
instances.
let input: InputStream tag
Stdin represented as an actor.
let out: OutStream tag
Stdout
let err: OutStream tag
Stderr
let args: Array[String val] val
The command line used to start the program.
let vars: Array[String val] val
The program's environment variables.
let exitcode: {(I32)} val
Sets the environment's exit code. The exit code of the root environment will be the exit code of the application, which defaults to 0.
© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/builtin-Env