package eio_linux
-
eio_linux
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Wrap Unix.file_descr
to track whether it has been closed.
val close : t -> unit
close t
closes t
.
val of_unix :
sw:Eio.Std.Switch.t ->
seekable:bool ->
close_unix:bool ->
Unix.file_descr ->
t
let t = of_unix ~sw ~seekable ~close_unix fd
wraps fd
as an open file descriptor. This is unsafe if fd
is closed directly (before or after wrapping it).
val to_unix : [< `Peek | `Take ] -> t -> Unix.file_descr
to_unix op t
returns the wrapped descriptor. This allows unsafe access to the FD. If op
is `Take
then t
is marked as closed (but the underlying FD is not actually closed).