Skip to contents

dod.download() is mainly intended for use by other functions in the dod package.

Usage

dod.download(
  url = NULL,
  file = NULL,
  destdir = ".",
  age = 0,
  quiet = FALSE,
  debug = 0
)

Arguments

url

character value giving the web address of a file to be downloaded. This has different values for different file types.

file

character value giving the name to be used for the downloaded file.

destdir

a character value indicating the directory in which to store downloaded files.

age

a numerical value indicating a time interval, in days. If the file to be downloaded from the server already exists locally, and was created less than age days in the past, it will not be downloaded again. Setting age=0 forces a download, so that existing files will always be updated. By contrast, setting age to a negative number prevents the updating of files that already exist locally, regardless of their age.

quiet

a logical value, passed to curl::curl_download(), which does the downloading. If this is TRUE (the default), then the work is done quietly. Until version version 0.1.12, this parameter was called silent, but it was renamed to match the corresponding argument in curl::curl_download(), which may be more familiar to users.

debug

an integer value indicating the level of debugging. If this exceeds 0, then some debugging messages will be printed. This value is passed down to related functions, but with 1 subtracted for each pass.

Value

dod.download returns a character value holding the full name of the file, including the path to destdir.