package eio

  1. Overview
  2. Docs

Portable file stats.

type kind = [
  1. | `Unknown
  2. | `Fifo
  3. | `Character_special
  4. | `Directory
  5. | `Block_device
  6. | `Regular_file
  7. | `Socket
]

Kind of file from st_mode. *

val pp_kind : kind Fmt.t

Pretty printer for kind.

type t = {
  1. dev : Stdlib.Int64.t;
    (*

    Device containing the filesystem where the file resides.

    *)
  2. ino : Stdlib.Int64.t;
    (*

    Inode number.

    *)
  3. kind : kind;
    (*

    File type.

    *)
  4. perm : Unix_perm.t;
    (*

    Permissions (mode).

    *)
  5. uid : Stdlib.Int64.t;
    (*

    User ID of owner.

    *)
  6. gid : Stdlib.Int64.t;
    (*

    Group ID of owner.

    *)
  7. rdev : Stdlib.Int64.t;
    (*

    Device's ID (if this is a device).

    *)
  8. size : Optint.Int63.t;
    (*

    Total size in bytes.

    *)
  9. atime : float;
    (*

    Last access time.

    *)
  10. mtime : float;
    (*

    Last modification time.

    *)
  11. ctime : float;
    (*

    Creation time.

    *)
}

Like stat(2).

val pp : t Fmt.t

Pretty printer for t.

OCaml

Innovation. Community. Security.