A file or directory in a directory that qualifies the
latter as a root.
dir
The directory to start the search from.
object_finder
A function that is applied to the root_object. If
the root object is a file, use rprojroot::has_file(), if it is a
directory, use rprojroot::has_dir().