package datakit-server

  1. Overview
  2. Docs

Inode.t operations.

type t

The type for inodes.

val pp : t Fmt.t

pp is the pretty-printer for inodes.

type kind = [
  1. | `File of File.t
  2. | `Dir of Dir.t
]

The type for inode kinds.

val file : string -> File.t -> t

file name f is the inode t such that basename t is name and kind t is File f.

val dir : string -> Dir.t -> t

dir name d is the inode t such that basename t is name and kind t is Dir d.

val basename : t -> string

basenane t is t's basename.

val set_basename : t -> string -> unit

set_basename t name changes t's basename to name.

val kind : t -> kind

kind t is t's kind.

val ino : t -> int64

ino t is a unique "inode number" for the file. If two files have the same inode number, then they are the same file.

OCaml

Innovation. Community. Security.