Description Usage Arguments Value Examples
Determine whether a resource exists relative to a director object.
1 | director_exists(resource, helper = FALSE)
|
resource |
character. The name of the resource. |
helper |
logical. Whether or not to check helper existence
in an idempotent resource. The default is |
TRUE
or FALSE
according as it does or does not
exist.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.