Iter.IOval lines_of : ?mode:int -> ?flags:Stdlib.open_flag list -> string -> string tlines_of filename reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from End_of_file (which is caught). The file is always properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results
val chunks_of :
?mode:int ->
?flags:Stdlib.open_flag list ->
?size:int ->
string ->
string tRead chunks of the given size from the file. The last chunk might be smaller. Behaves like lines_of regarding errors and options. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results
val write_to :
?mode:int ->
?flags:Stdlib.open_flag list ->
string ->
string t ->
unitwrite_to filename seq writes all strings from seq into the given file. It takes care of opening and closing the file.
val write_bytes_to :
?mode:int ->
?flags:Stdlib.open_flag list ->
string ->
Stdlib.Bytes.t t ->
unitval write_lines :
?mode:int ->
?flags:Stdlib.open_flag list ->
string ->
string t ->
unitSame as write_to, but intercales '\n' between each string
val write_bytes_lines :
?mode:int ->
?flags:Stdlib.open_flag list ->
string ->
Stdlib.Bytes.t t ->
unit