This function retrieves metadata about files in an archive, it can be passed
to archive_read() or archive_write to create a connection to read or
write a specific file from the archive.
Usage
archive(file, options = character(), password = NA_character_)Arguments
- file
File path to the archive.
- options
character()default:character(0)Options to pass to the filter or format. The list of available options are documented in options can have one of the following forms:option=valueThe option/value pair will be provided to every module. Modules that do not accept an option with this name will ignore it.optionThe option will be provided to every module with a value of "1".!optionThe option will be provided to every module with a NULL value.module:option=value,module:option,module:!optionAs above, but the corresponding option and value will be provided only to modules whose name matches module. See read options for available read options See write options for available write options
- password
character(1)The password to process the archive.
Value
A tibble with details about files in the archive.
See also
archive_read(), archive_write() to read and write archive files
using R connections, archive_extract(), archive_write_files(),
archive_write_dir() to add or extract files from an archive.
Examples
a <- archive(system.file(package = "archive", "extdata", "data.zip"))
a
#> # A tibble: 3 × 3
#> path size date
#> <chr> <int> <dttm>
#> 1 iris.csv 192 2017-04-28 19:55:29
#> 2 mtcars.csv 274 2017-04-28 19:55:29
#> 3 airquality.csv 142 2017-04-28 19:55:29