Learn R Programming

reproducible (version 3.2.1)

purgeChecksums: Purge the checksums of a single file

Description

This is a manual way of achieving prepInputs(..., purge = 7), useful in cases where prepInputs is not called directly by the user, so it would be difficult to set purge = 7.

Usage

purgeChecksums(checksumFile, fileToRemove)

Value

NULL. Run for its side effect, namely, and file removed from the CHECKSUMS.txt

file.

Arguments

checksumFile

A character string indicating the absolute path to the CHECKSUMS.txt file.

fileToRemove

The filename to remove from the checksumFile

Examples

Run this code
# Set up a small CHECKSUMS.txt-like file, then purge one entry
tf <- tempfile(fileext = ".txt")
data.table::fwrite(
  data.table::data.table(file = c("a.tif", "b.tif"), checksum = c("x1", "x2")),
  tf
)
purgeChecksums(tf, "a.tif")
data.table::fread(tf)
unlink(tf)

Run the code above in your browser using DataLab