purgeChecksums: Purge the checksums of a single file

View source: R/download.R

purgeChecksumsR Documentation

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)

Arguments

checksumFile

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

fileToRemove

The filename to remove from the checksumFile

Value

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

Examples

# 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)


reproducible documentation built on Aug. 26, 2026, 1:07 a.m.