Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A local filesystem storage backend for a Zarr V3 hierarchy.
include Zarr.Storage.STORE with type 'a Deferred.t = 'a
module Deferred : Zarr.Types.Deferred with type 'a t = 'a
val create_group :
?attrs:Yojson.Safe.t ->
t ->
Zarr.Node.GroupNode.t ->
unit Deferred.t
create_group ?attrs t node
creates a group node in store t
containing attributes attrs
. This is a no-op if node
is already a member of this store.
val create_array :
?sep:[< `Dot | `Slash Slash ] ->
?dimension_names:string option list ->
?attributes:Yojson.Safe.t ->
codecs:Zarr.Codecs.codec_chain ->
shape:int array ->
chunks:int array ->
'a Zarr.Ndarray.dtype ->
'a ->
Zarr.Node.ArrayNode.t ->
t ->
unit Deferred.t
create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t
creates an array node in store t
where:
sep
is used in the array's chunk key encoding.dimension_names
and user attributes attributes
are included in it's metadata document.codecs
.shape
and chunk shape chunks
.kind
and fill value fv
.val array_metadata :
t ->
Zarr.Node.ArrayNode.t ->
Zarr.Metadata.ArrayMetadata.t Deferred.t
array_metadata node t
returns the metadata of array node node
.
val group_metadata :
t ->
Zarr.Node.GroupNode.t ->
Zarr.Metadata.GroupMetadata.t Deferred.t
group_metadata node t
returns the metadata of group node node
.
val find_child_nodes :
t ->
Zarr.Node.GroupNode.t ->
(Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t
find_child_nodes t n
returns a tuple of child nodes of group node n
. This operation returns a pair of empty lists if node n
has no children or is not a member of store t
.
val find_all_nodes :
t ->
(Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t
find_all_nodes t
returns Some p
where p
is a pair of lists representing all nodes in store t
. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t
is empty.
val erase_group_node : t -> Zarr.Node.GroupNode.t -> unit Deferred.t
erase_group_node t n
erases group node n
from store t
. This also erases all child nodes of n
. If node n
is not a member of store t
then this is a no-op.
val erase_array_node : t -> Zarr.Node.ArrayNode.t -> unit Deferred.t
erase_array_node t n
erases group node n
from store t
. This also erases all child nodes of n
. If node n
is not a member of store t
then this is a no-op.
val erase_all_nodes : t -> unit Deferred.t
erase_all_nodes t
clears the store t
by deleting all nodes. If the store is already empty, this is a no-op.
val group_exists : t -> Zarr.Node.GroupNode.t -> bool Deferred.t
group_exists t n
returns true
if group node n
is a member of store t
and false
otherwise.
val array_exists : t -> Zarr.Node.ArrayNode.t -> bool Deferred.t
array_exists t n
returns true
if array node n
is a member of store t
and false
otherwise.
val write_array :
t ->
Zarr.Node.ArrayNode.t ->
Zarr.Ndarray.Indexing.index array ->
'a Zarr.Ndarray.t ->
unit Deferred.t
write_array t n s x
writes n-dimensional array x
to the slice s
of array node n
in store t
.
val read_array :
t ->
Zarr.Node.ArrayNode.t ->
Zarr.Ndarray.Indexing.index array ->
'a Zarr.Ndarray.dtype ->
'a Zarr.Ndarray.t Deferred.t
read_array t n s k
reads an n-dimensional array of size determined by slice s
from array node n
.
val reshape : t -> Zarr.Node.ArrayNode.t -> int array -> unit Deferred.t
reshape t n shape
resizes array node n
of store t
into new size shape
.
val create :
?perm:Eio.File.Unix_perm.t ->
env:< fs : Eio.Fs.dir_ty Eio.Path.t.. > ->
string ->
t
create ~perm ~env dir
returns a new filesystem store.
val open_store :
?perm:Eio.File.Unix_perm.t ->
env:< fs : Eio.Fs.dir_ty Eio.Path.t.. > ->
string ->
t
open_store ~perm ~env dir
returns an existing filesystem Zarr store.