Skip to contents

Copies files listed in a manifest from their source paths to a destination directory, preserving timestamps and validating contents immediately upon copy. Manifests must come from a trusted source. Source and destination paths are confined to their respective directories and must not contain parent-directory traversals.

Usage

copy_data_manifest(
  dir = ".",
  manifest = NULL,
  project_root = here::here(),
  overwrite = FALSE
)

Arguments

dir

Destination directory for frozen copies.

manifest

Data frame with columns file and source. If NULL, read from file.path(dir, "manifest.csv").

project_root

Absolute or relative root directory for resolving source paths (default: here::here()).

overwrite

Logical; whether to overwrite existing destination files (default: FALSE).

Value

A validation tibble produced by validate_data_manifest.