Functoria.ActionWrapper around Bos which provides a "dry run" feature.
val ok : 'a -> 'a tAn action that returns a value.
val error : string -> 'a terror e is the failed action with error message e.
val errorf : ('a, Stdlib.Format.formatter, unit, 'b t) Stdlib.format4 -> 'aerrorf fmt is the failed action with error message fmt.
module List : sig ... endmodule Infix : sig ... endmodule Syntax : sig ... endval rm : Fpath.t -> unit tDelete a file. (see Bos.OS.File.delete)
val mkdir : Fpath.t -> bool tCreate a directory. (See Bos.OS.Dir.create
val rmdir : Fpath.t -> unit tRemove a directory. (see Bos.OS.Dir.delete)
with_dir d f runs f with d as current working directory. (See Bos.OS.Dir.with_current).
val pwd : unit -> Fpath.t tpwd () is the current working directory. (See Bos.OS.Dir.current)
val is_file : Fpath.t -> bool tDoes a file exist? (see Bos.OS.File.exists)
val is_dir : Fpath.t -> bool tDoes a directory exist? (see Bos.OS.Dir.exists)
val size_of : Fpath.t -> int option tsize_of f is Some i if f exists and is of size i, and None if f doesn't exist.
val set_var : string -> string option -> unit tset_var v c sets env variable c to c. (see Bos.OS.Env.set_var)
val get_var : string -> string option tget_var v gets the value of the variable c in the environment. (see Bos.OS.Env.get)
Run a command. By default, err is Fmt.stderr and out is Fmt.stdout. (see Bos.OS.Cmd.run)
Run a command and return its trimmed stdout. By default err is Fmt.stderr. (See Bos.OS.Cmd.run_out)
val run_cmd_cli : Bos.Cmd.t -> unit tRun a command as a command line interface, meaning stdout and stderr remain untouched.
val write_file : Fpath.t -> string -> unit tWrite some data to a file. (see Bos.OS.File.write)
val read_file : Fpath.t -> string tread_file f is f's contents. (see Bos.OS.File.read)
val tmp_file : ?mode:int -> Bos.OS.File.tmp_name_pat -> Fpath.t ttmp_file pat is a tempory file built using the pattern pat. (See Bos.OS.File.tmp)
val ls : Fpath.t -> (Fpath.t -> bool) -> Fpath.t list tls dir is the list of files in dir.
val with_output :
?mode:int ->
?append:bool ->
path:Fpath.t ->
purpose:string ->
(Stdlib.Format.formatter -> 'a) ->
'a tOpen a file with a given mode, and write some data to it through a function. (see Bos.OS.File.with_oc). purpose is used in error messages. If append is set (by default it is not), the data is appended to path.
val run : 'a t -> ('a, Rresult.R.msg) Stdlib.resultRun the command through Bos.
The type for interpreted values.
eq_domain is the equality function between domains.
Emulate the action. This will not do IO on the actual files. Some approximation is done to determine the result of actions. files is a list of paths that are supposed to exist at the beginning. Returns:
Bos error)