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