Module B0_cmdlet.EnvSource

Cmdlet execution environments.

Sourcetype cmdlet = t
Sourcetype t

The type for cmdlet execution environments.

Sourceval v : cwd:B0_std.Fpath.t -> scope_dir:B0_std.Fpath.t -> root_dir:B0_std.Fpath.t -> b0_dir:B0_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.

Sourceval cwd : t -> B0_std.Fpath.t

cwd c is the absolute path to the current working directory.

Sourceval scope_dir : t -> B0_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.

Sourceval root_dir : t -> B0_std.Fpath.t

root_dir c is the root directory.

Sourceval b0_dir : t -> B0_std.Fpath.t

b0_dir c is the b0 directory.

Sourceval scratch_dir : t -> B0_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.

Sourceval cmdlet : t -> cmdlet

cmdlet e is the executing cmdlet.