1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process.R
\name{unzip_process}
\alias{unzip_process}
\title{Class for an external unzip process}
\usage{
unzip_process()
}
\value{
An \code{unzip_process} R6 class object, a subclass of
\link[processx:process]{processx::process}.
}
\description{
\code{unzip_process()} returns an R6 class that represents an unzip process.
It is implemented as a subclass of \link[processx:process]{processx::process}.
}
\section{Using the \code{unzip_process} class}{
\if{html}{\out{<div class="sourceCode">}}\preformatted{up <- unzip_process()$new(zipfile, exdir = ".", poll_connection = TRUE,
stderr = tempfile(), ...)
}\if{html}{\out{</div>}}
See \link[processx:process]{processx::process} for the class methods.
Arguments:
\itemize{
\item \code{zipfile}: Path to the zip file to uncompress.
\item \code{exdir}: Directory to uncompress the archive to. If it does not
exist, it will be created.
\item \code{poll_connection}: passed to the \code{initialize} method of
\link[processx:process]{processx::process}, it allows using \code{\link[processx:poll]{processx::poll()}} or the
\code{poll_io()} method to poll for the completion of the process.
\item \code{stderr}: passed to the \code{initialize} method of \link[processx:process]{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.
\item \code{...} passed to the \code{initialize} method of \link[processx:process]{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)
}
|