download_files: Download multiple files

Description Usage Arguments Value

Description

Download multiple files.

Usage

1
2
3
download_files(urls, dest_dir, ..., labels = NULL, overwrite = FALSE,
  count = TRUE, dest_file = NULL, copy_file_urls = TRUE,
  progress = NULL, report = TRUE, headers = NULL)

Arguments

urls

A character vector of urls

dest_dir

A single existing directory to download files into

...

Currently ignored

labels

A character vector of labels to use to describe the files being downloaded when printing (defaults to basename(urls))

overwrite

Overwrite files that exist already? If FALSE (the default) then existing files are skipped.

count

Logical, indicating if a count of progress across the urls should be included.

dest_file

If the files should be renamed as they are downloaded, include a vector of filenames here the same length as urls. Directory components will be created, within dest_dir.

copy_file_urls

Logical, indicating if file:/// urls should be copied into dest_dir

progress

Print a progress bar?

report

Print a summary?

headers

Named character vector of HTTP headers (optional)

Value

A character vector, the same length as urls, with the destination file paths (even if no downloading was done). A failure to download a file (e.g., a 403 forbidden, 404 not found, or general network error) will result in an R error.


mrc-ide/provisionr documentation built on May 15, 2019, 1:43 p.m.