taf.unzip | R Documentation |
Extract files from a zip archive, retaining executable file permissions.
taf.unzip(zipfile, files = NULL, exdir = ".", unzip = NULL, ...)
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 |
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.
No return value, called for side effects.
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.
unzip
is the base function to unzip files.
TAF-package
gives an overview of the package.
## Not run:
exefile <- if(os.unix()) "run" else "run.exe"
taf.unzip("boot/software/archive.zip", files=exefile, exdir="model")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.