Module Node.Group

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.

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

The infix operator alias of create

val of_path : string -> t

of_path s returns a node from string s.

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 if 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_metakey 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 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.

val rename : t -> string -> t

rename t s returns a new group node with all properties of t but with its name changed to s.