Class providing access to user attributes on an array or group.
Public fields
storeAttributes store, already initialized.
keyThe key under which the attributes will be stored.
read_onlyIf True, attributes cannot be modified.
cacheIf True (default), attributes will be cached locally.
synchronizerOnly necessary if attributes may be modified from multiple threads or processes.
Methods
Method new()
Create a new Attributes instance.
Usage
Attributes$new(
store,
key = NA,
read_only = FALSE,
cache = TRUE,
synchronizer = NA,
zarr_format = NULL
)Arguments
store(Store)
Attributes store, already initialized.key(
character(1))
Key to use for attributes (.zattrsis default).read_only(
logical(1))
Whether the attributes are read-only.cache(
logical(1))
Whether to cache attributes.synchronizer(
ANYorNA)
Synchronizer object.zarr_format(
integer(1)orNULL)
Zarr format version:2Lfor V2 (.zattrs),3Lfor V3 (zarr.json).
Method set_cached_v3_attrs()
Set cached attributes from V3 embedded metadata. In V3, attributes are part of zarr.json rather than a separate .zattrs file. This method pre-populates the cache so the normal .zattrs read path is skipped.
