123456789101112131415161718192021222324252627282930313233343536openIostreammoduleIn:sigopenInvalof_unix_fd:?close_noerr:bool->Unix.file_descr->t_seekable(** Create an in stream from a raw Unix file descriptor. The file descriptor
must be opened for reading. *)end=structopenInletof_unix_fd?(close_noerr=false)(fd:Unix.file_descr):t_seekable=objectmethodinputbufilen=Unix.readfdbufilenmethodclose()=ifclose_noerrthen(tryUnix.closefdwith_->())elseUnix.closefdmethodseeki=ignore(Unix.lseekfdiUnix.SEEK_SET:int)methodpos():int=Unix.lseekfd0Unix.SEEK_CURendendmoduleOut:sigopenOutvalof_unix_fd:Unix.file_descr->t_seekable(** Output stream directly writing into the given Unix file descriptor. *)end=structopenOutletof_unix_fdfd:t_seekable=of_out_channel(Unix.out_channel_of_descrfd)end