pack_directory: Create a zipped or tarred and gzipped archive of a directory

View source: R/compressed.R

pack_directoryR Documentation

Create a zipped or tarred and gzipped archive of a directory

Description

Create a zipped or tarred and gzipped archive of a directory

Usage

pack_directory(directory, fmt = c("tgz", "zip")[1],
  outfile = file.path(dirname(directory), paste0(basename(directory), c(tgz =
  ".tar.gz", zip = ".zip")[fmt])))

Arguments

directory

one or more directories to pack. NOTE they are not packed together.

fmt

character, indicates output format. Currently just 'tgz' and 'zip'

outfile

the full qualified name(s) of the output archive(s)

Value

named logical indicating the outfile exists (or not!)

See Also

Other COMPRESSED: is_bzip2, is_gzip, is_tgz, is_zip, test_compressed, un_bzip2, un_gz, un_tgz, un_zip, unpack_archive


btupper/rscripting documentation built on Oct. 18, 2022, 6:47 p.m.