crossplatform.unzip: Unzip a zip archive file Unzip a zip archive file,...

Description Usage Arguments Value Author(s) Examples

Description

Unzip a zip archive file Unzip a zip archive file, crossplatform - ie on mac, windows and linux If zip.filename is a URL, it is first downlaoded to dest On MacOS, this function removes the hidden ._ files, and __MACOSX folder which get created by the Finder>Create Archive program on some Mac platforms. As with all zip files, if the zipped files are not within a subdirectory, they will all be extracted to destdir, so you may want to ensure that the destdir is clean and empty

Usage

1
crossplatform.unzip(zip.filename, dest = NULL, verbose = FALSE)

Arguments

zip.filename

the path, or url to a single zip file

dest

the path to the destination directory. If NULL, then it is unzipped in the current working directory

verbose

logical: noisy?

Value

a character vector of paths to the files that were unzipped.

Author(s)

Mark Cowley, 2010-01-08

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# f <- "http://mirror.aarnet.edu.au/pub/CRAN/bin/windows/contrib/r-release/sos_1.3-1.zip"
f <- "http://cran.r-project.org/bin/windows/contrib/r-release/sos_1.3-1.zip"
# cran.mirror <- getOption("repos", default="http://cran.r-project.org")
# f <- paste(cran.mirror, "bin/windows/contrib/r-release/sos_1.3-1.zip", sep="/")
files <- crossplatform.unzip(f, "/tmp")
files

## End(Not run)

drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.