build_status: Identify what files need to be rebuilt and what need to be...

Description Usage Arguments Details Value See Also

View source: R/utils-built-db.R

Description

This takes in a vector of files and compares them against a text database of files with checksums. It's been heavily adapted from blogdown to provide utilities for removal and updating of the old database.

Usage

1
2
3
4
5
6
build_status(
  sources,
  db = "site/built/md5sum.txt",
  rebuild = FALSE,
  write = FALSE
)

Arguments

sources

a character vector of ALL source files OR a single file to be rebuilt. These must be absolute paths

db

the path to the database

rebuild

if the files should be rebuilt, set this to TRUE (defaults to FALSE)

write

if TRUE, the database will be updated, Defaults to FALSE, meaning that the database will remain the same.

Details

If you supply a single file into this function, we assume that you want that one file to be rebuilt, so we will always return that file in the $build element and update the md5 sum in the database (if it has changed at all).

If you supply multiple files, you are indicating that these are the only files you care about and the database will be updated accordingly, removing entries missing from the sources.

Value

a list of the following elements

See Also

get_resource_list(), get_built_db(), get_hash()


zkamvar/sandpaper documentation built on Nov. 25, 2021, 1:16 p.m.