Download file from generic source url
dlGeneric(
url,
destinationPath,
targetFile = NULL,
applyRemap = TRUE,
verbose = getOption("reproducible.verbose", 1)
)The url (link) to the file.
Character string of a directory in which to download
and save the file that comes from url and is also where the function
will look for archive or targetFile.
To prevent repeated downloads in different locations, the user can also set
options("reproducible.destinationPathShared") to one or more local file paths to
search for the file before attempting to download. Default for that option is
NULL meaning do not search locally. The previous name
options("reproducible.inputPaths") is still accepted as a backwards-compatible
alias.
Optional basename to give the downloaded file. When supplied
(e.g. by dlGoogle() after a URL remap) the file is named with this rather
than basename(url), so the rest of the pipeline sees the expected filename.
Logical. When TRUE (default) the reproducible.urlRemap
hook is consulted here. Callers that have already applied the remap (e.g.
dlGoogle() delegating a remapped Drive URL) pass FALSE to avoid a
second call.
Numeric, -1 silent (where possible), 0 being very quiet,
1 showing more messaging, 2 being more messaging, etc.
Default is 1. Above 3 will output much more information about the internals of
Caching, which may help diagnose Caching challenges. Can set globally with an
option, e.g., options('reproducible.verbose' = 0) to reduce to minimal
Eliot McIntire and Alex Chubaty