Purge individual line items from checksums file
.purge(
checkSums,
purge,
targetFile,
archive,
alsoExtract,
url,
destinationPath
)
A checksums file, e.g., created by Checksums(..., write = TRUE)
Logical or Integer. 0/FALSE
(default) keeps existing
CHECKSUMS.txt
file and
prepInputs
will write or append to it. 1/TRUE
will deleted the entire
CHECKSUMS.txt
file. Other options, see details.
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
postProcess
. The internal checksumming does not checksum
the file after it is postProcess
ed (e.g., cropped/reprojected/masked).
Using Cache
around prepInputs
will do a sufficient job in these cases.
See table in preProcess()
.
Optional character string giving the path of an archive
containing targetFile
, or a vector giving a set of nested archives
(e.g., c("xxx.tar", "inner.zip", "inner.rar")
). If there is/are (an) inner
archive(s), but they are unknown, the function will try all until it finds
the targetFile
. See table in preProcess()
. If it is NA
,
then it will not attempt to see it as an archive, even if it has archive-like
file extension (e.g., .zip
). This may be useful when an R function
is expecting an archive directly.
Optional character string naming files other than
targetFile
that must be extracted from the archive
. If
NULL
, the default, then it will extract all files. Other options:
"similar"
will extract all files with the same filename without
file extension as targetFile
. NA
will extract nothing other
than targetFile
. A character string of specific file names will cause
only those to be extracted. See table in preProcess()
.
Optional character string indicating the URL to download from.
If not specified, then no download will be attempted. If not entry
exists in the CHECKSUMS.txt
(in destinationPath
), an entry
will be created or appended to. This CHECKSUMS.txt
entry will be used
in subsequent calls to
prepInputs
or preProcess
, comparing the file on hand with the ad hoc
CHECKSUMS.txt
. See table in preProcess()
.
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
. NOTE (still experimental):
To prevent repeated downloads in different locations, the user can also set
options("reproducible.inputPaths")
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.