Skip to contents

Parses a .dvc pointer file and downloads the corresponding data file from the public Cloudflare R2 remote.

Usage

dvc_download_file(x, output_dir, overwrite = FALSE, pkg_nm = "nemo")

Arguments

x

Path to a .dvc pointer file.

output_dir

Directory to write the downloaded file into.

overwrite

Logical. If FALSE, skip if the file already exists.

pkg_nm

Package name, used to point to the Cloudflare R2 bucket of interest.

Value

Path to the downloaded file, or NULL if skipped.

Examples

x <- system.file("extdata/dvc-example/sampleA.tool1.table1.tsv.dvc", package = "nemo")
output_dir <- file.path(tempdir(), "dvc_single_test")
result <- dvc_download_file(x, output_dir)
result_cached <- dvc_download_file(x, output_dir, overwrite = FALSE)