Os.Fd
File descriptors operations.
unix_buffer_size
is the value of the OCaml runtime system buffer size for I/O operations.
apply ~close fd f
calls f fd
and ensure close fd
is is called whenever the function returns. Any Unix.Unix_error
raised by close fd
is ignored.
copy ~buf src ~dst
reads src
and writes it to dst
using buf
as a buffer; if unspecified a buffer of length unix_buffer_size
is created for the call. Raise Unix.Unix_error
if that happens
to_string fd
reads fd
to a string. Raises Unix.Unix_error
in case of error.