find_root_file(..., filename, contents = NULL, n = -1L, path = getwd())make_find_root_file(filename, contents = NULL, n = -1L)make_fix_root_file(filename, contents = NULL, n = -1L)find_rstudio_root_file(..., path = getwd())find_package_root_file(..., path = getwd())
file.path
Append an arbitrary number of path components to the root using
file.path
.
The find_root_file
function is a simple wrapper around
find_root
that
appends an arbitrary number of path components to the root using
file.path
.
The function make_find_root_file
can be used to create shorthand functions
such as find_rstudio_root_file
and find_package_root_file
.
In many cases, the function make_fix_root_file
is even more useful:
It creates a shorthand function that is tied to a fixed root (as opposed to
make_find_root_file
which creates a function that will look for the
root every time it is called).
## Not run: # find_package_root_file("tests", "testthat.R") # make_find_root_file(glob2rx("DESCRIPTION"), "^Package: ") # make_fix_root_file(glob2rx("DESCRIPTION"), "^Package: ") # ## End(Not run)