Module Os.Fd
File descriptors operations.
val unix_buffer_size : intunix_buffer_sizeis the value of the OCaml runtime system buffer size for I/O operations.
val apply : close:(Unix.file_descr -> unit) -> Unix.file_descr -> (Unix.file_descr -> 'a) -> 'aapply ~close fd fcallsf fdand ensureclose fdis is called whenever the function returns. AnyUnix.Unix_errorraised byclose fdis ignored.
val copy : ?buf:Stdlib.Bytes.t -> src:Unix.file_descr -> Unix.file_descr -> unitcopy ~buf ~src dstreadssrcand writes it todstusingbufas a buffer; if unspecified a buffer of lengthunix_buffer_sizeis created for the call.- raises Unix_error
if that happens
val to_string : Unix.file_descr -> stringto_string fdreadsfdto a string.- raises Unix_error
in case of error.
val read_file : string -> Unix.file_descr -> stringread_file fn fdreadsfdto a string assuming it is a file descriptor open on file pathfn.- raises Failure
in case of error with an error message that mentions
fn.