Skip to contents

Mirrors batch.download. With filename_to_download = NULL the whole job is fetched as one zip archive and unpacked; naming a single file fetches just that file from the job manifest.

Usage

db_batch_download(
  job_id,
  output_dir = ".",
  filename_to_download = NULL,
  keep_zip = FALSE
)

Arguments

job_id

Job identifier, as returned by db_batch_submit_job().

output_dir

Directory to write into; a subdirectory named after the job is created inside it. Defaults to the working directory.

filename_to_download

Optional single file from the job manifest.

keep_zip

Keep the archive after unpacking it. Only meaningful when downloading a whole job.

Value

A character vector of the paths written, invisibly.

Details

A file that already exists locally at the size the manifest reports is left alone, so an interrupted download resumes by calling the function again. When the digest package is installed, each file's SHA-256 is checked against the manifest and a mismatch raises a warning.

Examples

if (FALSE) { # \dontrun{
db_batch_download("GLBX-20240101-ABCDEF", output_dir = tempdir())
} # }