unzip {utils} | R Documentation |
Extract files from or list a zip archive.
unzip(zipfile, files = NULL, list = FALSE, overwrite = TRUE, junkpaths = FALSE, exdir = ".", unzip = "internal")
zipfile |
The pathname of the zip file: tilde expansion (see
|
files |
A character vector of recorded filepaths to be extracted: the default is to extract all files. |
list |
If |
overwrite |
If |
junkpaths |
If |
exdir |
The directory to extract files to (the equivalent of
|
unzip |
The method to be used. An alternative is to use
|
If list = TRUE
, a data frame with columns Name
(character) Length
(the size of the uncompressed file, usually
integer, conceivably numeric with an external unzip
) and
Date
(of class "POSIXct"
).
Otherwise for the "internal"
method, a character vector of the
filepaths extracted to, invisibly.
This is a minimal implementation, principally designed for Windows'
users to be able to unpack Windows binary packages without external
software. It does not (for example) support Unicode filenames and
large files as introduced in zip 3.0
: for that use
unzip = "unzip"
with unzip 6.00
or later.
If unzip
specifies a program, the format of the dates listed
with list=TRUE
is unknown (on Windows it can even depend on
the current locale) and the return values could be NA
or
expressed in the wrong timezone or misinterpreted (the latter being
far less likely as from unzip 6.00
).
The internal C code uses zlib
and is in particular based on the
contributed minizip application in the zlib
sources
(from http://zlib.net) by Gilles Vollant.
unz
to read a single component from a zip file.
zip
.