Skip to contents

This function will delete all mirrored files stored locally.

Usage

delete_mirror(deposit_id, cache_type = NULL, cache_dir = NULL)

Arguments

deposit_id

numeric. The Zenodo deposit id.

cache_type

character. Use temporary to a session temporary folder, persistent for a persistent cache folder or NULL to use the environment default. Check the section Cache Type for more details.

cache_dir

character. User specified cache directory for persistent cache type.

Value

No return value. The function deletes mirrored on the system.

Examples

# https://zenodo.org/records/10959197
file_path <- zen_file(10959197, "iris.rds")
print(file_path)
#> /tmp/RtmpXlzcdf/zendown/10959197/iris.rds
file.exists(file_path)
#> [1] TRUE
delete_mirror(10959197)
#>  The cache of deposit 10959197 was deleted
file.exists(file_path)
#> [1] FALSE