Skip to contents

Walks path and bundles daf.json, axes/metadata.json, every scalars/*.json, every vectors/<axis>/*.json, and every matrices/<rows>/<cols>/*.json into a single path/metadata.zip archive, written atomically via metadata.zip.new + rename. Required for serving a FilesDaf over HTTP via http_daf(); from dafr 0.2.0 onward, FilesDaf writes maintain the bundle automatically — call this only to repack a tree that was built by an older dafr (pre-0.2.0) or modified outside dafr.

Usage

pack_files_daf_metadata(path)

Arguments

path

Directory path to a FilesDaf root.

Value

The absolute path to the written metadata.zip, invisibly.

Examples

# The underlying mmap-zip writer is POSIX-only.
if (.Platform$OS.type != "windows") {
  p <- tempfile("daf-")
  files_daf(p, "w+")
  pack_files_daf_metadata(p)
}