A Daf store backed by a directory of small self-describing files,
bidirectionally compatible with Julia's DataAxesFormats.FilesDaf.
Writes are non-atomic; only one writer may touch a store at a time.
Usage
files_daf(path, mode = c("r", "r+", "w", "w+"), name = NULL, packed = FALSE)Arguments
- path
Directory path.
- mode
One of
"r"(read-only, store must exist),"r+"(read-write, store must exist),"w"(create; fails if store already exists),"w+"(create or open an existing store; if the store already exists, itsscalars,axes,vectors,matricessubdirectories anddaf.jsonare truncated, but unrelated files in the directory are preserved).- name
Human-readable identifier. Defaults to
basename(path).- packed
When
TRUE(writeable modes only), dense vectors, dense matrices, and large sparse components that exceed the packing threshold are written as compressed dual-format.zipshards (DataAxesFormats.jl 0.3.0 "indexed+zipped" packed format) instead of flat binary payloads. Small components and string properties always stay flat. Tuning is read from thedafr.packed_compression,dafr.packed_compression_level, anddafr.packed_target_chunk_kboptions. Defaults toFALSE(flat layout).
Concurrent access
files_daf does not lock the store. Two writers opening the same
path in mode "r+" or "w+" will race on metadata.zip rebuilds
and per-entry JSON writes, with no guarantee of last-writer-wins
consistency. The supported pattern is single-writer plus arbitrary
read-only readers; cross-process concurrency must be coordinated
externally (e.g., a job scheduler).