package line_oriented

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type filename = string

to make signatures more readable

val with_in_file : filename -> (Stdlib.in_channel -> 'a) -> 'a

work with open input file

val to_string : filename -> string

read whole file content

val with_out_file : filename -> (Stdlib.out_channel -> 'a) -> 'a

work with open output file

val with_infile_outfile : filename -> filename -> (Stdlib.in_channel -> Stdlib.out_channel -> 'a) -> 'a

work with open input and output files

val lines_of_file : filename -> string list

read all lines from file

val rev_lines_of_file : filename -> string list

reverse read all lines from file

val lines_to_file : filename -> string list -> unit

write all lines to file

val iter : filename -> (string -> unit) -> unit

iter on lines of file

val iteri : filename -> (int -> string -> unit) -> unit

iteri on lines of file

val map : filename -> (string -> 'a) -> 'a list

map on lines of file

val mapi : filename -> (int -> string -> 'a) -> 'a list

mapi on lines of file

val rev_map : filename -> (string -> 'a) -> 'a list

reverse map on lines of file

val fold : filename -> ('a -> string -> 'a) -> 'a -> 'a

fold on lines of file

val filter : filename -> (string -> bool) -> string list

filter lines of file

val count : filename -> int

count lines of file

val length : filename -> int

alias for count

val save : filename -> 'a -> unit

save fn x: marshal x to file fn

val restore : filename -> 'a

restore fn: unmarshal value from whole file fn

OCaml

Innovation. Community. Security.