Something went wrong. Try again.
Shells in OCaml
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031(** {! Fd_table}
An in-memory representation of [/proc/self/fd]. *)
type t(** A file descriptor table *)
val add_fd : src:int -> tgt:int -> t -> t(** [add_fd ~src ~tgt m] adds a new mapping from [src] to [tgt]. *)
val add_path : src:int -> tgt:string -> t -> t(** [add_path ~src ~tgt m] adds a new mapping from [src] to the path [tgt]. *)
val remove : int -> t -> t(** [remove fd t] removes any binding of [fd] in [t]. *)
val load : _ Eio.Path.t -> t(** [load path_to_proc] preloads the current set of FDs. *)
val merge : t -> t -> t(** [merge fds1 fds2] produces a new FD table merging two FD tables together. The second FD table takes precedence in the case of conflict. *)
val empty : t(** The empty file descriptor table. *)
val pp : t Fmt.t(** A pretty printer for FD tables. *)
val jsont : t Jsont.t