Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unzip_process

Class for an external unzip process


Description

unzip_process() returns an R6 class that represents an unzip process. It is implemented as a subclass of processx::process.

Usage

unzip_process()

Value

An unzip_process R6 class object, a subclass of processx::process.

Using the unzip_process class

up <- unzip_process()$new(zipfile, exdir = ".", poll_connection = TRUE,
                           stderr = tempfile(), ...)

See processx::process for the class methods.

Arguments:

  • zipfile: Path to the zip file to uncompress.

  • exdir: Directory to uncompress the archive to. If it does not exist, it will be created.

  • poll_connection: passed to the initialize method of processx::process, it allows using processx::poll() or the poll_io() method to poll for the completion of the process.

  • stderr: passed to the initialize method of processx::process, by default the standard error is written to a temporary file. This file can be used to diagnose errors if the process failed.

  • ... passed to the initialize method of processx::process.

Examples

ex <- system.file("example.zip", package = "zip")
tmp <- tempfile()
up <- unzip_process()$new(ex, exdir = tmp)
up$wait()
up$get_exit_status()
dir(tmp)

zip

Cross-Platform 'zip' Compression

v2.1.1
CC0
Authors
Gábor Csárdi, Kuba Podgórski, Rich Geldreich
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.