Module With_file_methods.File

val map : f:(t -> 'a) -> string -> 'a list

map ~f filename maps the function f over the binary data in the file filename using the provided M.

val fold : f:('a -> t -> 'a) -> string -> init:'a -> 'a

fold ~f filename ~init folds the function f over the binary data in the file filename using the provided M, starting with the initial value init.

val iter : string -> f:(t -> unit) -> unit

iter filename ~f iterates the function f over the binary data in the file filename using the provided M.

val read_all : string -> t list

read_all filename reads a list of binary values from the file filename using the provided M.

val write_all : string -> t list -> unit

write_all filename data writes the binary representation of a list of data to the file filename using the provided M.

val read : string -> t

read filename reads the binary representation of a value from the file filename using the provided M.

val write : string -> t -> unit

write filename data writes the binary representation of data to the file filename using the provided M.