Module OS.File

val null : Fpath.t
val dash : Fpath.t
val exists : Fpath.t -> (bool, [> Rresult.R.msg ]) result
val must_exist : Fpath.t -> (Fpath.t, [> Rresult.R.msg ]) result
val delete : ?must_exist:bool -> Fpath.t -> (unit, [> Rresult.R.msg ]) result
val truncate : Fpath.t -> int -> (unit, [> Rresult.R.msg ]) result
val is_executable : Fpath.t -> bool
type input = unit -> (Bytes.t * int * int) option
val with_input : ?bytes:Bytes.t -> Fpath.t -> (input -> 'a -> 'b) -> 'a -> ('b, [> Rresult.R.msg ]) result
val with_ic : Fpath.t -> (in_channel -> 'a -> 'b) -> 'a -> ('b, [> Rresult.R.msg ]) result
val read : Fpath.t -> (string, [> Rresult.R.msg ]) result
val read_lines : Fpath.t -> (string list, [> Rresult.R.msg ]) result
val fold_lines : ('a -> string -> 'a) -> 'a -> Fpath.t -> ('a, [> Rresult.R.msg ]) result
type output = (Bytes.t * int * int) option -> unit
val with_output : ?mode:int -> Fpath.t -> (output -> 'a -> ('c, [> Rresult.R.msg ] as 'b) result) -> 'a -> (('c, 'b) result, [> Rresult.R.msg ]) result
val with_oc : ?mode:int -> Fpath.t -> (out_channel -> 'a -> ('c, [> Rresult.R.msg ] as 'b) result) -> 'a -> (('c, 'b) result, [> Rresult.R.msg ]) result
val write : ?mode:int -> Fpath.t -> string -> (unit, [> Rresult.R.msg ]) result
val writef : ?mode:int -> Fpath.t -> ('a, Format.formatter, unit, (unit, [> Rresult.R.msg ]) result) format4 -> 'a
val write_lines : ?mode:int -> Fpath.t -> string list -> (unit, [> Rresult.R.msg ]) result
type tmp_name_pat = (string -> string, Format.formatter, unit, string) format4
val tmp : ?mode:int -> ?dir:Fpath.t -> tmp_name_pat -> (Fpath.t, [> Rresult.R.msg ]) result
val with_tmp_output : ?mode:int -> ?dir:Fpath.t -> tmp_name_pat -> (Fpath.t -> output -> 'a -> 'b) -> 'a -> ('b, [> Rresult.R.msg ]) result
val with_tmp_oc : ?mode:int -> ?dir:Fpath.t -> tmp_name_pat -> (Fpath.t -> out_channel -> 'a -> 'b) -> 'a -> ('b, [> Rresult.R.msg ]) result