Validate Object
The validate_object()
function in the reportifyr
package checks whether a file’s stored hash
in its corresponding metadata .json
file matches its current hash
.
validate_object()
Returns
- Logical:
TRUE
if the file’shash
matches the storedhash
, otherwiseFALSE
.
Logging
- Debug: Logs the start and end of the function.
- Info: Logs a confirmation of
file
, its corresponding metadata file, and bothhash
values. - Warn: Logs when a hash mismatch is encountered.
- Error: Logs errors for missing
file
, its corresponding metadata file, and if the metadata lacks a value for thehash
field.
Additional Resources
- reportifyr GitHub: Refer to the
reportifyr
repository for more details. - digest Reference Manual: Refer to the
digest
reference manual for specific inquiries related tohash
values generated usingdigest::digest()
.