Module Statx.Attr

include FLAGS
type t = private int

A set of flags.

val empty : t
val of_int : int -> t
val (+) : t -> t -> t

a + b is the union of the sets.

val mem : t -> t -> bool

mem x flags is true iff x is a subset of flags.

val compressed : t

The file is compressed by the filesystem.

val immutable : t

The file cannot be modified, as defined by chattr(1).

val append : t

The file can only be opened in append mode for writing. See chattr(1).

val nodump : t

The file is not a candidate for backup when a backup program scans the filesystem.

val encrypted : t

A key is required for the file to be encrypted by the filesystem.

val verity : t

The file has fs-verity enabled. It cannot be written to, and all reads from it will be verified against a cryptographic hash that covers the entire file.

val dax : t

The file is in the DAX (cpu direct access) state, which minimises page-cache effects for both I/O and memory mappings of this file.

  • since Linux 5.8
val check : ?mask:Int64.t -> Int64.t -> t -> bool

check ?mask attr t will check if t is set in attr.

If mask is not None then it will first check the mask to see if the file attribute is supported and if not raise Invalid_argument.