
Sys provides static access to the system's environment.
Slots
- appDir
-
static File appDir()
Get the application home directory. The appDir is automatically exposed into the namespace as part of the root Resource:
- In
fand
this is the app directory used to boot the namespace. - In
fant
this is the test directory. - In other VMs it is the current working directory.
- In
- args
-
static Str[] args()
Get the command line arguments used to run the fan process as a readonly List of strings.
- env
-
static Str:Str env()
Get the environment variables as a readonly map of Str name/value pairs. The environment map is initialized from the following sources from lowest priority to highest priority:
- shell environment variables
- Java system properties (Java VM only obviously)
- {homeDir}/lib/sys.props
- err
-
static OutStream err()
Standard error output stream.
- exit
-
static Void exit(Int status := def)
Terminate the current virtual machine.
- homeDir
-
static File homeDir()
Get the fan installation home directory.
- hostName
-
static Str hostName()
Get the local host name of the machine running the virtual machine process.
- in
-
static InStream in()
Standard output stream.
-
new make()
Private constructor.
- namespace
-
static Resource namespace()
Get the resource which defines the root of the local virtual machine's Uri namespace. This resource always has a uri of "/".
- out
-
static OutStream out()
Standard output stream.
- userName
-
static Str userName()
Get the user name of the user account used to run the virtual machine process.