repo_check: Check repository integrity.

Description Usage Details Value Examples

View source: R/repo_public.R

Description

Checks that all indexed data are present in the repository root, that files are not corrupt and that no unindexed files are present.

Usage

1

Details

Every time the object associated to an item is stored, an MD5 checksum is saved to the repository index. check will use those to verify that the object was not changed by anything other than Repo itself.

Value

Used for side effects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Repository creation
rp_path <- file.path(tempdir(), "example_repo")
rp <- repo_open(rp_path, TRUE)

rp_path <- file.path(tempdir(), "example_repo")
rp <- repo_open(rp_path, TRUE)
rp$put(0, "item1", "A sample item", "repo_check")
rp$check()

## wiping temporary repo
unlink(rp_path, TRUE)

franapoli/repo documentation built on May 17, 2021, 7:24 p.m.