Extract zip or tar archive files, possibly nested in other zip or tar archives.

extractFromArchive(
  archive,
  destinationPath = getOption("reproducible.destinationPath", dirname(archive)),
  neededFiles = NULL,
  extractedArchives = NULL,
  checkSums = NULL,
  needChecksums = 0,
  filesExtracted = character(),
  checkSumFilePath = character(),
  quick = FALSE,
  verbose = getOption("reproducible.verbose", 1),
  .tempPath,
  ...
)

Arguments

archive

Character string giving the path of the archive containing the file to be extracted. This path must exist or be NULL

destinationPath

Character string giving the path where neededFiles will be extracted. Defaults to the archive directory.

neededFiles

Character string giving the name of the file(s) to be extracted.

extractedArchives

Used internally to track archives that have been extracted from.

checkSums

A checksums file, e.g., created by Checksums(..., write = TRUE)

needChecksums

A numeric, with 0 indicating do not write a new checksums, 1 write a new one, 2 append new information to existing one.

filesExtracted

Used internally to track files that have been extracted.

checkSumFilePath

The full path to the checksum.txt file

quick

Passed to Checksums

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., options('reproducible.verbose' = 0) to reduce to minimal

.tempPath

Optional temporary path for internal file intermediate steps. Will be cleared on.exit from this function.

...

Passed to unzip or untar, e.g., overwrite

Value

A character vector listing the paths of the extracted archives.