sig
module Env :
sig
val var : string -> string option
val opt_var : string -> absent:string -> string
end
module File :
sig
val null : Topkg.fpath
val dash : Topkg.fpath
val exists : Topkg.fpath -> bool Topkg.result
val must_exist : Topkg.fpath -> Topkg.fpath Topkg.result
val delete : ?must_exist:bool -> Topkg.fpath -> unit Topkg.result
val fold :
?skip:(Topkg.fpath -> bool) ->
(Topkg.fpath -> 'a -> 'a) ->
'a -> Topkg.fpath list -> 'a Topkg.result
val read : Topkg.fpath -> string Topkg.result
val write : Topkg.fpath -> string -> unit Topkg.result
val write_subst :
Topkg.fpath -> (string * string) list -> string -> unit Topkg.result
val tmp : unit -> Topkg.fpath Topkg.result
end
module Dir :
sig
val exists : Topkg.fpath -> bool Topkg.result
val must_exist : Topkg.fpath -> Topkg.fpath Topkg.result
val contents :
?dotfiles:bool ->
?rel:bool -> Topkg.fpath -> Topkg.fpath list Topkg.result
val current : unit -> Topkg.fpath Topkg.result
val set_current : Topkg.fpath -> unit Topkg.result
val with_current : Topkg.fpath -> ('a -> 'b) -> 'a -> 'b Topkg.result
end
module Cmd :
sig
val exists : Topkg.Cmd.t -> bool Topkg.result
val must_exist : Topkg.Cmd.t -> Topkg.Cmd.t Topkg.result
val run : ?err:Topkg.fpath -> Topkg.Cmd.t -> unit Topkg.result
val run_status :
?err:Topkg.fpath -> Topkg.Cmd.t -> [ `Exited of int ] Topkg.result
type run_status = Topkg.Cmd.t * [ `Exited of int ]
val success :
('a * Topkg.OS.Cmd.run_status) Topkg.result -> 'a Topkg.result
type run_out
val out_string :
?trim:bool ->
Topkg.OS.Cmd.run_out ->
(string * Topkg.OS.Cmd.run_status) Topkg.result
val out_lines :
?trim:bool ->
Topkg.OS.Cmd.run_out ->
(string list * Topkg.OS.Cmd.run_status) Topkg.result
val out_file :
Topkg.fpath ->
Topkg.OS.Cmd.run_out -> (unit * Topkg.OS.Cmd.run_status) Topkg.result
val out_stdout :
Topkg.OS.Cmd.run_out -> (unit * Topkg.OS.Cmd.run_status) Topkg.result
val to_string :
?trim:bool -> Topkg.OS.Cmd.run_out -> string Topkg.result
val to_lines :
?trim:bool -> Topkg.OS.Cmd.run_out -> string list Topkg.result
val to_file : Topkg.fpath -> Topkg.OS.Cmd.run_out -> unit Topkg.result
val run_out : ?err:Topkg.fpath -> Topkg.Cmd.t -> Topkg.OS.Cmd.run_out
end
end