Determine whether a resource exists relative to a director object.

director_exists(resource, helper = FALSE)

Arguments

resource

character. The name of the resource.

helper

logical. Whether or not to check helper existence in an idempotent resource. The default is FALSE.

Value

TRUE or FALSE according as it does or does not exist.

Examples

not_run({ # Imagine we have a file structure: # - foo # - one # - one.R # - helper.R # - two.R # # Then the bellow will return \code{TRUE}, \code{FALSE}, and \code{TRUE}, # respectively. Note that the \code{"helper.R"} file is not considered a # resource by the director as \code{"one.R"} shares its name with its # parent directory and is considered the accessible resource. d <- director('foo') d$exists('one') d$exists('one/helper') d$exists('two') })