This function wraps download.file
. When
caching is enabled, cachedDownload
will save a copy of the resulting
file to temporary storage and record that location in the query cache.
Subsequent download requests will just copy the cached file to the
destination path and not make a request across the network.
cachedDownload(url, destfile, ...)
character URL to download
character file path/name where the download should be saved
additional arguments, ultimately passed to download.file
From download.file
: "An (invisible) integer
code, 0
for success and non-zero for failure. For the "wget"
and "curl"
methods this is the status code returned by the
external program. The "internal"
method can return 1
, but will
in most cases throw an error."