find_file: Determine Path to File

View source: R/find_file.R

find_fileR Documentation

Determine Path to File

Description

Determine the path of a defined file via brute force search of (optionally) the root directory.

Usage

find_file(pattern, root = Sys.getenv("HOME"))

Arguments

pattern

Character string of the pattern match.

root

The path of the root directory to start the highest level search.

Value

The path(s) containing the regular expression specified in pattern.

Examples

## Not run: 
find_file("infection_data.csv")
fs::file_create("myfile.txt")
find_file("myfile.txt")

## End(Not run)

stufield/stuRpkg documentation built on April 2, 2022, 2:05 p.m.