sys
System utilities.
Types
_None._
Functions
exit(code: int) -> void
Terminate the process with a status code.
Parameters
code: int- Exit status.
---
cwd(region: Region) -> String
Return the current working directory.
Parameters
region: Region- Allocation region for the returned string.
Returns
- Current working directory as string, or empty string on failure.
---
getenv(name: String, region: Region) -> Option[String]
Get an environment variable value.
Parameters
name: String- Environment variable name.region: Region
Returns
- Value as
Some[String], orNoneif missing.
---
platform(region: Region) -> String
Return a short platform identifier string.
Parameters
region: Region- Allocation region for the returned string.
Returns
- Platform name as string
---
sleep(ms: int) -> void
Sleep for a number of milliseconds (approximate).
Parameters
ms: int- Milliseconds.
---
system(cmd: String) -> int
Execute a command using the host system shell.
Parameters
cmd: String- Command string.
Returns
- Command exit code (platform-dependent).