Env [Src]

An environment holds the command line and other values injected into the program by default by the runtime.

class val Env

Constructors

create [Src]

Build an artificial environment. A root capability may be supplied.

new ref create(
  root': (AmbientAuth val | None val),
  input': Stdin tag,
  out': StdStream tag,
  err': StdStream tag,
  args': Array[String val] val,
  vars': (Array[String val] val | None val))
: Env ref^

Parameters

Returns


Public fields






Public Functions

vars [Src]

Return the environment variables as an array of strings of the form "key=value".

fun box vars()
: Array[String val] val

Returns


exitcode [Src]

Sets the application exit code. If this is called more than once, the last value set will be the exit code. The exit code defaults to 0.

fun tag exitcode(
  code: I32 val)
: None val

Parameters

  • code: I32 val

Returns