extract_archive: Extract Archive Contents

View source: R/utils.R

extract_archiveR Documentation

Extract Archive Contents

Description

Extract contents of an archive to a directory. Requires that the archive package is available.

Usage

extract_archive(file, destdir = tempdir())

Arguments

file

'character' string. File path to the archive.

destdir

'character' string. Destination directory to extract files to. It will be created if necessary. Defaults to the temporary directory.

Value

Invisibly returns the extracted path(s).

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

files <- system.file("extdata", "test.zip", package = "inldata") |>
  extract_archive()

unlink(files)

inldata documentation built on Sept. 12, 2024, 9:34 a.m.