package datakit-github

  1. Overview
  2. Docs

A read-only tree of files, directories and symlinks.

type t

The type for trees.

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

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

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

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

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

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

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

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

val read_file : t -> Datakit_client.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 -> Datakit_client.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.