Module Os.File

val exists : Fpath.t -> (bool, string) result
val must_exist : Fpath.t -> (unit, string) result
val is_executable : Fpath.t -> bool
val delete : Fpath.t -> (bool, string) result
val truncate : Fpath.t -> int -> (unit, string) result
val read_with_fd : Fpath.t -> (Unix.file_descr -> 'b) -> ('b, string) result
val read_with_ic : Fpath.t -> (in_channel -> 'b) -> ('b, string) result
val read : Fpath.t -> (string, string) result
val write_with_fd : ?atomic:bool -> ?mode:int -> force:bool -> make_path:bool -> Fpath.t -> (Unix.file_descr -> ('a, 'b) result) -> (('a, 'b) result, string) result
val write_with_oc : ?atomic:bool -> ?mode:int -> force:bool -> make_path:bool -> Fpath.t -> (out_channel -> ('a, 'b) result) -> (('a, 'b) result, string) result
val write : ?atomic:bool -> ?mode:int -> force:bool -> make_path:bool -> Fpath.t -> string -> (unit, string) result
val copy : ?atomic:bool -> ?mode:int -> force:bool -> make_path:bool -> src:Fpath.t -> Fpath.t -> (unit, string) result
val with_tmp_fd : ?flags:Unix.open_flag list -> ?mode:int -> ?make_path:bool -> ?dir:Fpath.t -> ?name:Path.tmp_name -> (Fpath.t -> Unix.file_descr -> 'b) -> ('b, string) result
val open_tmp_fd : ?flags:Unix.open_flag list -> ?mode:int -> ?make_path:bool -> ?dir:Fpath.t -> ?name:Path.tmp_name -> unit -> (Fpath.t * Unix.file_descr, string) result
val with_tmp_oc : ?flags:Unix.open_flag list -> ?mode:int -> ?make_path:bool -> ?dir:Fpath.t -> ?name:Path.tmp_name -> (Fpath.t -> out_channel -> 'b) -> ('b, string) result