Module Odoc_utils.Io_utilsSource
with_open_* are resource safe wrappers around opening and closing channels. They are equivalent to the same functions in OCaml 4.14's In_channel and Out_channel.
Read a file line-by-line by folding f.
Read a file as a list of lines.
Like with_open_out but operate on a Format buffer. Uses a Buffer to accumulate output and writes it to the file in one go at the end. This avoids per-chunk channel mutex acquisition in the multicore runtime.
Shortcuts for composing with_open_* functions and Marshal.