downloadFile {reproducible} | R Documentation |
A wrapper around a set of downloading functions
Description
Currently, this only deals with googledrive::drive_download
,
and utils::download.file()
. In general, this is not intended for use by a
user.
Usage
downloadFile(
archive,
targetFile,
neededFiles,
destinationPath = getOption("reproducible.destinationPath", "."),
quick,
checksumFile,
dlFun = NULL,
checkSums,
url,
needChecksums,
preDigest,
overwrite = getOption("reproducible.overwrite", TRUE),
verbose = getOption("reproducible.verbose", 1),
purge = FALSE,
.tempPath,
...
)
Arguments
archive |
Optional character string giving the path of an archive
containing |
targetFile |
Character string giving the filename (without relative or
absolute path) to the eventual file
(raster, shapefile, csv, etc.) after downloading and extracting from a zip
or tar archive. This is the file before it is passed to
|
neededFiles |
Character string giving the name of the file(s) to be extracted. |
destinationPath |
Character string of a directory in which to download
and save the file that comes from |
quick |
Logical. This is passed internally to |
checksumFile |
A character string indicating the absolute path to the |
dlFun |
Optional "download function" name, such as |
checkSums |
A checksums file, e.g., created by Checksums(..., write = TRUE) |
url |
Optional character string indicating the URL to download from.
If not specified, then no download will be attempted. If not entry
exists in the |
needChecksums |
A numeric, with |
preDigest |
The list of |
overwrite |
Logical. Should downloading and all the other actions occur even if they pass the checksums or the files are all there. |
verbose |
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., |
purge |
Logical or Integer. |
.tempPath |
Optional temporary path for internal file intermediate steps. Will be cleared on.exit from this function. |
... |
Passed to |
Value
This function is called for its side effects, which will be a downloaded file
(targetFile
), placed in destinationPath
. This file will be checksummed, and
that checksum will be appended to the checksumFile
.
Author(s)
Eliot McIntire