module Open_flags:sig..end
type t
Open_flags.t represents the flags associated with a file descriptor in the
open-file-descriptor table. It deals with the same thing as OCaml's open_flag
type; however, it uses Core's Flags approach and the underlying integer bitmask
representation, and so interoperates more smoothly with C.include Flags.S
val rdonly : t
These three flags are not individual bits like flags usually are. The access mode
is represented by the lower two bits of the Open_flags.t. A particular
Open_flags.t should include exactly one access mode. Combining different
Open_flags.t's using flags operations (e.g +) is only sensible if they have the
same access mode.
val wronly : tval rdwr : tval creat : tval excl : tval noctty : tval trunc : tval append : tval nonblock : tval dsync : tval sync : tval rsync : tval can_read : t -> boolcan_read t iff t has rdonly or rdwrval can_write : t -> boolcan_read t iff t has wronly or rdwrval sexp_of_t : t -> Sexplib.Sexp.t
These three flags are not individual bits like flags usually are. The access mode
is represented by the lower two bits of the Open_flags.t. A particular
Open_flags.t should include exactly one access mode. Combining different
Open_flags.t's using flags operations (e.g +) is only sensible if they have the
same access mode.
creation
can_read t iff t has rdonly or rdwr
can_read t iff t has wronly or rdwr