Compress raw.owner/ to raw.owner.tar.gz and delete the directory.
archiveRawOwner.RdSaves 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.
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"))
#> [1] TRUE