This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/utils/html/unzip.html
unzip {utils}R Documentation

Extract or List Zip archines

Description

Extract files from or list a zip archive.

Usage

unzip(zipfile, files = NULL, list = FALSE, overwrite = TRUE,
       junkpaths = FALSE, exdir = ".")

Arguments

zipfile

The pathname of the xip file: tilde expansion (see path.expand will be performed.

files

A character vector of recorded filepaths to be extracted: the default is to extract all files.

list

If TRUE, list the files and extract none. The equivalent of unzip -l.

overwrite

If TRUE, overwrite existing files, otherwise ignore such files. The equivalent of unzip -o.

junkpaths

If TRUE, use only the basename of the stored filepath when extraxting. The equivalent of unzip -j.

exdir

The directory to extract files to (the equivalent of unzip -d). It will be created if necessary.

Details

Extraction will overwrite any existing files.

Value

If list = TRUE, a data frame with columns Name, Length (the size of the uncompressed file) and Date (of class "POSIXct").

Otherwise, a character vector of the filepaths extracted to, invisibly.

Source

The C code uses zlib and is in particular based on the contributed ‘⁠minizip⁠’ application in the zlib sources by Gilles Vollant.

See Also

zip.file.extract


[Package utils version 2.9.0 ]