module IOExtras: sig end
Some I/O utility functions
val open_out : string -> Pervasives.out_channel
Open a file for output and auto-flush at exit
val output_endline : Pervasives.out_channel -> string -> unit
print_endline
on a generic channel.
val output_int : Pervasives.out_channel -> int -> unit
print_int
on a generic channel.
val input_continued : ?squish:bool -> Pervasives.in_channel -> string
Read a line from a handle where a trailing non-escaped \ on the
line means to read the next line and concatenate it to the end of the
previous line.
squish
: true
if any leading whitespace in the continuation
of the line should be removed. Defaults to false
.
val snarf_file : string -> string
read_file filename
returns the contents of filename.