zip_process {zip} | R Documentation |
zip_process()
returns an R6 class that represents a zip process.
It is implemented as a subclass of processx::process.
zip_process()
A zip_process
R6 class object, a subclass of
processx::process.
zip_process
classzp <- zip_process()$new(zipfile, files, recurse = TRUE)
See processx::process for the class methods.
Arguments:
zipfile
: Path to the zip file to create.
files
: List of file to add to the archive. Each specified file
or directory in is created as a top-level entry in the zip archive.
recurse
Whether to add the contents of directories recursively.
dir.create(tmp <- tempfile()) write.table(iris, file = file.path(tmp, "iris.ssv")) zipfile <- tempfile(fileext = ".zip") zp <- zip_process()$new(zipfile, tmp) zp$wait() zp$get_exit_status() zip_list(zipfile)