Fd_by_descr
is a table of the open Fd.t
s, indexed by file descriptor number.
In this interface, we use Raw_fd.t
rather than Fd.t
to avoid a dependency cycle,
because the Fd
module can't be defined yet.
include sig ... end
val sexp_of_t : t ‑> Sexplib.Sexp.t
val create : num_file_descrs:int ‑> t
val add : t ‑> Raw_fd.t ‑> unit Core.Or_error.t
val mem : t ‑> Import.File_descr.t ‑> bool
val find : t ‑> Import.File_descr.t ‑> Raw_fd.t option
val find_exn : t ‑> Import.File_descr.t ‑> Raw_fd.t