generalΒΆ
fun chdir(Path..: any): nil
Changes the current directory to
Path
.fun execute(Command..: any): nil | error
Builds a shell command from
Command..
and executes it, discarding the output. Returnsnil
on success or raises an error.fun mkdir(Path..: any): nil | error
Creates a directory with path
Path
if it does not exist, creating intermediate directories if required.fun open(Path: any, Mode: string): file
Opens the file at path
Path
with the specified mode.fun print(Values..: any): nil
Prints out
Values
to standard output.fun shell(Command..: any): string | error
Builds a shell command from
Command..
and executes it, capturing the output. Returns the captured output on success or raises an error.fun execv(Command: list): nil | error
Similar to
execute()
but expects a list of individual arguments instead of letting the shell split the command line.fun shellv(Command: list): nil | error
Similar to
shell()
but expects a list of individual arguments instead of letting the shell split the command line.fun defined(Name: string): string | nil
If
Name
was defined in the rabs command line then returns the associated value, otherwise returnsnil
.fun getenv(Name: string): string | nil
Returns the current value of the environment variable
Name
ornil
if it is not defined.fun include(Path..: string): any
Loads the Minilang file or shared library specified by
Path
.fun scope(Name: string, Function: function): any
Creates a new scoped subcontext with name
Name
and callsFunction()
in the new context.fun setenv(Name: string, Value: string): nil
Sets the value of the environment variable
Name
toValue
.fun subdir(Name: string): context | error
Creates a new directory subcontext with name
Name
and loads thebuild.rabs
file inside the directory. Returns an error if the directory does not exist or does not contain abuild.rabs
file.fun vmount(Path: string, Source: string): nil
Mounts the directory
Source
ontoPath
. Resolving a file inPath
will also checkSource
.fun target(Path: string): target | error
Returns the target with path
Path
if is has been defined, otherwise raises an error.fun check(Target..: target): nil
Checks that each
Target
is up to date, building if necessary.