package zarr

  1. Overview
  2. Docs
type t

The type of a Group node.

val root : t

creates the root node

val create : t -> string -> t

create p n returns a group node with parent p and name n.

  • raises Failure

    if node invariants are not satisfied.

val (/) : t -> string -> t

The infix operator alias of create

val of_path : string -> t

of_path s returns a node from string s.

  • raises Failure

    if node invariants are not satisfied.

val to_path : t -> string

to_path n returns node n as a string path.

val name : t -> string

name n returns the name of node n. The root node does not have a name and thus the empty string "" is returned if n is a root node.

val parent : t -> t option

parent n returns Some p where p is the parent node of n of None if node n is the root node.

val (=) : t -> t -> bool

x = y returns true if nodes x and y are equal, and false otherwise.

val ancestors : t -> t list

ancestors n returns ancestor nodes of n including the root node. The root node has no ancestors, thus this returns the empty list is called on a root node.

val to_key : t -> string

to_key n converts a node's path to a key, as defined in the Zarr V3 specification.

val to_prefix : t -> string

to_prefix n converts a node's path to a prefix key, as defined in the Zarr V3 specification.

val to_metakey : t -> string

to_prefix n returns the metadata key associated with node n, as defined in the Zarr V3 specification.

val is_child_group : t -> t -> bool

is_child_group m n Tests if group node m is a the immediate parent of group node n. Returns true when the test passes and false otherwise.

val show : t -> string

show n returns a string representation of a node type.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t pretty prints a node type value.

OCaml

Innovation. Community. Security.