package datakit-client

  1. Overview
  2. Docs
type t

The type for trees.

type +'a result

The type for results.

val read : t -> Path.t -> value result

read t path is the contents of the object at the path.

val stat : t -> Path.t -> stat option result

stat t path is the metadata of the object at path.

val exists : t -> Path.t -> bool result

exists t path is true if stat t path isn't None.

val exists_file : t -> Path.t -> bool result

exists_file t path is similar to exists but for files only.

val exists_dir : t -> Path.t -> bool result

exists_dir t path is similar to exists but for directories only.

val read_file : t -> Path.t -> Cstruct.t result

read_file t path resolves path to a file, or returns an error if it isn't a file.

val read_dir : t -> Path.t -> string list result

read_dir t path resolves path to a directory, or returns an error if it isn't one.

read_link t path resolves path to a symlink, or returns an error if it isn't one.

OCaml

Innovation. Community. Security.