| taf.unzip {TAF} | R Documentation |
Unzip File
Description
Extract files from a zip archive, retaining executable file permissions.
Usage
taf.unzip(zipfile, files = NULL, exdir = ".", unzip = NULL, ...)
Arguments
zipfile |
zip archive filename. |
files |
files to extract, default is all files. |
exdir |
directory to extract to, will be created if necessary. |
unzip |
extraction method to use, see details below. |
... |
passed to |
Details
The default method unzip = NULL uses the external unzip
program in Unix-compatible operating systems, but an internal method in
Windows. For additional information, see the unzip help page.
Value
No return value, called for side effects.
Note
One shortcoming of the base unzip function is that the default
"internal" method resets file permissions, so Linux and macOS
executables will return a 'Permission denied' error when run.
This function is identical to the base unzip function, except the
default value unzip = NULL chooses an appropriate extraction method in
all operating systems, making it useful when writing platform-independent
scripts.
See Also
unzip is the base function to unzip files.
TAF-package gives an overview of the package.
Examples
## Not run:
exefile <- if(os.unix()) "run" else "run.exe"
taf.unzip("boot/software/archive.zip", files=exefile, exdir="model")
## End(Not run)