System Interfaces
The standard library provides the following interfaces for interacting with the operating system in
the core.sys
package:
-
void open(core.io.Url file)
Open an
Url
using the default program that is associated with the file in the operating system. Throws aSystemError
on failure. -
void execute(core.io.Url program, core.Array<core.Str> params)
Execute the program
program
with the parameters inparams
. Ifprogram
is a relative url that consists of a single part, then the function searches for the program in thePATH
variable. -
void execute(core.io.Url program, core.Array<core.Str> params, core.Maybe<core.io.Url> workingDirectory)
Execute the program
program
with the parameters inparams
. Start the program in the specified working directory if specified. Ifprogram
is a relative url that consists of a single part, then the function searches for the program in thePATH
variable.