archiveRawOwner: Compress raw.owner/ to 'raw.owner.tar.gz' and delete the...

View source: R/archiveRawOwner.R

archiveRawOwnerR Documentation

Compress ⁠raw.owner/⁠ to raw.owner.tar.gz and delete the directory.

Description

Saves disk space after the parser has succeeded. Returns silently if nothing to do (no ⁠raw.owner/⁠ directory) or if the archive already exists. Only deletes ⁠raw.owner/⁠ after the tar archive is verified (re-readable). On any failure, leaves both intact.

Usage

archiveRawOwner(path)

Arguments

path

Absolute path to the station folder containing ⁠raw.owner/⁠.

Value

Logical, TRUE if archive newly written, FALSE if no-op, NA on failure.

Examples

station <- file.path(tempdir(), "gmsp-archive-example")
unlink(station, recursive = TRUE)
dir.create(file.path(station, "raw.owner"), recursive = TRUE)
writeLines("provider bytes", file.path(station, "raw.owner", "record.txt"))
archiveRawOwner(station)
file.exists(file.path(station, "raw.owner.tar.gz"))


gmsp documentation built on July 18, 2026, 5:07 p.m.