Module File.Mode

Permissions bits.

type t = [
| `NUMERIC of int

The bits.

These are accepted by operations such as Luv.File.chmod in lists, e.g.


The special constructor `NUMERIC can be used to specify bits directly in octal. The above list is equivalent to:

[`NUMERIC 0o644]
type numeric

Abstract type for a bit field of permissions bits, i.e., an int in which multiple bits may be set. These bit fields are returned by operations such as Luv.File.stat.

val test : t list -> numeric -> bool

Luv.File.Mode.test mask bits checks whether all the bits in mask are set in bits. For example, if bits contains 0o644, Luv.File.Mode.test [`IRUSR] bits evaluates to true.