are_files_available: Check whether the given files exist in the package cache.

Description Usage Arguments Value Examples

View source: R/filecache.R

Description

Check whether the given files exist in the package cache. You can pass MD5 sums, which will be verified and only files with correct MD5 hash will count as existing.

Usage

1
are_files_available(pkg_info, relative_filenames, md5sums = NULL)

Arguments

pkg_info,

named list. Package identifier, see get_pkg_info() on how to get one.

relative_filenames,

vector of strings. A vector of filenames, relative to the package cache.

md5sums,

vector of strings or NULL. A list of MD5 checksums, one for each file in param 'relative_filenames', if not NULL. If given, the files will only be reported as existing if the MD5 sums match.

Value

logical vector. For each file, whether it passed the check.

Examples

1
2
    pkg_info = get_pkg_info("mypackage")
    is_available = are_files_available(pkg_info, c("file1.txt", "file2.txt"))

pkgfilecache documentation built on May 18, 2021, 1:06 a.m.