sig
type 'a or_error = ('a, string) Result.result
type 'a gen = unit -> 'a option
val with_in :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> (Pervasives.in_channel -> 'a) -> 'a
val read_chunks : ?size:int -> Pervasives.in_channel -> string CCIO.gen
val read_line : Pervasives.in_channel -> string option
val read_lines : Pervasives.in_channel -> string CCIO.gen
val read_lines_l : Pervasives.in_channel -> string list
val read_all : ?size:int -> Pervasives.in_channel -> string
val read_all_bytes : ?size:int -> Pervasives.in_channel -> Bytes.t
val with_out :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> (Pervasives.out_channel -> 'a) -> 'a
val with_out_a :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> (Pervasives.out_channel -> 'a) -> 'a
val write_line : Pervasives.out_channel -> string -> unit
val write_gen :
?sep:string -> Pervasives.out_channel -> string CCIO.gen -> unit
val write_lines : Pervasives.out_channel -> string CCIO.gen -> unit
val write_lines_l : Pervasives.out_channel -> string list -> unit
val with_in_out :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> (Pervasives.in_channel -> Pervasives.out_channel -> 'a) -> 'a
val tee : ('a -> unit) list -> 'a CCIO.gen -> 'a CCIO.gen
module File :
sig
type t = string
val to_string : CCIO.File.t -> string
val make : string -> CCIO.File.t
val exists : CCIO.File.t -> bool
val is_directory : CCIO.File.t -> bool
val remove_exn : CCIO.File.t -> unit
val remove : CCIO.File.t -> unit CCIO.or_error
val remove_noerr : CCIO.File.t -> unit
val read_dir : ?recurse:bool -> CCIO.File.t -> CCIO.File.t CCIO.gen
val read_exn : CCIO.File.t -> string
val read : CCIO.File.t -> string CCIO.or_error
val append_exn : CCIO.File.t -> string -> unit
val append : CCIO.File.t -> string -> unit CCIO.or_error
val write_exn : CCIO.File.t -> string -> unit
val write : CCIO.File.t -> string -> unit CCIO.or_error
type walk_item = [ `Dir | `File ] * CCIO.File.t
val walk : CCIO.File.t -> CCIO.File.walk_item CCIO.gen
val walk_l : CCIO.File.t -> CCIO.File.walk_item list
val show_walk_item : CCIO.File.walk_item -> string
val with_temp :
?temp_dir:string ->
prefix:string -> suffix:string -> (string -> 'a) -> 'a
end
end