Does the input contain a directory?

isDirectory(x)

isDir(x)

isADirectory(x, nullOK = FALSE)

isADir(x, nullOK = FALSE)

allAreDirectories(x)

allAreDirs(x)

Arguments

x

Object.

nullOK

logical(1). If set to TRUE, x may also be NULL.

Value

logical.

Functions

  • isDirectory: Vectorized.

  • isDir: Short alias for isDirectory().

  • isADirectory: Scalar.

  • isADir: Short alias for isADirectory().

  • allAreDirectories: Scalar variant.

  • allAreDirs: Short alias for allAreDirectories().

See also

R.utils::isDirectory().

getS3method(
    f = "isDirectory",
    class = "default",
    envir = asNamespace("R.utils")
)

Examples

## TRUE ==== isDirectory(c("~", "~"))
#> ~ ~ #> TRUE TRUE
isADirectory("~")
#> [1] TRUE
## FALSE ==== isDirectory(1L)
#> [1] FALSE #> Cause of failure: #> x is not character.