B0_cmdlet.Env
Cmdlet execution environments.
type cmdlet = t
See B0_cmdlet.t
.
val v : cwd:B00_std.Fpath.t -> scope_dir:B00_std.Fpath.t -> root_dir:B00_std.Fpath.t -> b0_dir:B00_std.Fpath.t -> cmdlet:cmdlet -> t
v ~cwd ~scope_dir ~root_dir ~cmdlet
is an execution context with given parameters. See corresponding accessors for semantics.
val cwd : t -> B00_std.Fpath.t
cwd c
is the absolute path to the current working directory.
val scope_dir : t -> B00_std.Fpath.t
scope_dir c
is the absolute path to the directory of the B0 file in which the cmdlet is defined or the root directory if the cmdlet is defined the global scope.
val root_dir : t -> B00_std.Fpath.t
root_dir c
is the root directory.
val b0_dir : t -> B00_std.Fpath.t
b0_dir c
is the b0 directory.
val scratch_dir : t -> B00_std.Fpath.t
scratch_dir c
is a shared scratch directory for cmdlets in b0_dir
. The directory must be created it may not exist, it's content may be destroyed at any time and cmdlets are in charge of inventing a naming scheme to avoid collisions.