Module Core_unix.Open_flags

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
access mode.

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 : t
val rdwr : t
val creat : t
creation
val excl : t
val noctty : t
val trunc : t
val append : t
val nonblock : t
val dsync : t
val sync : t
val rsync : t
val can_read : t -> bool
can_read t iff t has rdonly or rdwr
val can_write : t -> bool
can_read t iff t has wronly or rdwr
val sexp_of_t : t -> Sexplib.Sexp.t

access mode.

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