Module Bos_os_path

val uerror : Unix.error -> string
val file_exists : Fpath.t -> (bool, [> `Msg of string ]) result
val dir_exists : Fpath.t -> (bool, [> `Msg of string ]) result
val exists : Fpath.t -> (bool, [> `Msg of string ]) result
val file_must_exist : Fpath.t -> (Fpath.t, [> `Msg of string ]) result
val dir_must_exist : Fpath.t -> (Fpath.t, [> `Msg of string ]) result
val must_exist : Fpath.t -> (Fpath.t, [> `Msg of string ]) result
val delete_file : ?must_exist:bool -> Fpath.t -> (unit, [> `Msg of string ]) result
val delete_dir : ?must_exist:bool -> ?recurse:bool -> Fpath.t -> (unit, [> `Msg of string ]) result
val delete : ?must_exist:bool -> ?recurse:bool -> Fpath.t -> (unit, [> `Msg of string ]) result
val move : ?force:bool -> Fpath.t -> Fpath.t -> (unit, [> `Msg of string ]) result
val stat : Fpath.t -> (Unix.stats, [> `Msg of string ]) result
module Mode : sig ... end
val err_realpath_path : Fpath.t -> string -> ('a, [> `Msg of string ]) result
val realpath : Fpath.t -> (Fpath.t, [> `Msg of string ]) result
val exists_realpath : Fpath.t -> (Fpath.t option, [> `Msg of string ]) result
val force_remove : string -> Fpath.t -> Fpath.t -> (unit, [> `Msg of string ]) result
val match_segment : bool -> env:string Astring.String.Map.t option -> (string * string Astring.String.Map.t option) list -> string -> Bos_pat.lexeme list -> ((string * string Astring.String.Map.t option) list, [> `Msg of string ]) result
val match_path : ?dotfiles:bool -> env:string Astring.String.Map.t option -> Fpath.t -> ((string * string Astring.String.Map.t option) list, [> `Msg of string ]) result
val matches : ?dotfiles:bool -> Fpath.t -> (Fpath.t list, [> `Msg of string ]) result
val query : ?dotfiles:bool -> ?init:string Astring.String.Map.t -> Fpath.t -> ((Fpath.t * string Astring.String.Map.t) list, [> `Msg of string ]) result
type 'a res = ('a, [ `Msg of string ]) result
type traverse = [
  1. | `Any
  2. | `None
  3. | `Sat of Fpath.t -> bool res
]
type elements = [
  1. | `Any
  2. | `Files
  3. | `Dirs
  4. | `Sat of Fpath.t -> bool res
]
type 'a fold_error = Fpath.t -> 'a res -> unit res
val log_fold_error : level:Logs.level -> 'a -> ('b, [< `Msg of string ]) result -> (unit, 'c) result
exception Fold_stop of [ `Msg of string ]
val err_fun : ('a -> ('b, 'c) result -> (unit, [ `Msg of string ]) result) -> ('a -> ('d, 'c) result) -> backup_value:'d -> 'a -> 'd
val err_predicate_fun : ('a -> ('b, 'c) result -> (unit, [ `Msg of string ]) result) -> ('a -> (bool, 'c) result) -> 'a -> bool
val do_traverse_fun : ('a -> ('b, 'c) result -> (unit, [ `Msg of string ]) result) -> [< `Any | `None | `Sat of 'a -> (bool, 'c) result ] -> 'a -> bool
val is_element_fun : (Fpath.t -> ('a, [> `Msg of string ] as 'b) result -> (unit, [ `Msg of string ]) result) -> [< `Any | `Dirs | `Files | `Sat of Fpath.t -> (bool, 'b) result ] -> Fpath.t -> bool
val is_dir_fun : (Fpath.t -> ('a, [> `Msg of string ]) result -> (unit, [ `Msg of string ]) result) -> Fpath.t -> bool
val readdir_fun : (Fpath.t -> ('a, [> `Msg of string ]) result -> (unit, [ `Msg of string ]) result) -> Fpath.t -> string array
val fold : ?err: (Fpath.t -> ('a, [ `Msg of string ]) result -> (unit, [ `Msg of string ]) result) -> ?dotfiles:bool -> ?elements: [< `Any | `Dirs | `Files | `Sat of Fpath.t -> (bool, [ `Msg of string ]) result Any ] -> ?traverse: [< `Any | `None | `Sat of Fpath.t -> (bool, [ `Msg of string ]) result Any ] -> (Fpath.t -> 'b -> 'b) -> 'b -> Fpath.t list -> ('b, [> `Msg of string ]) result