R: Class for an external zip process

zip_process {zip} | R Documentation

## Class for an external zip process

### Description

`zip_process()` returns an R6 class that represents a zip process. It is implemented as a subclass of processx::process.

### Usage

    zip_process()

### Value

A `zip_process` R6 class object, a subclass of processx::process.

### Using the `zip_process` class

    zp <- 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.

### Examples

    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)

[Package zip version 2.0.1 Index]