check-vector-isFile: Does the input contain a file?

check-vector-isFileR Documentation

Does the input contain a file?

Description

Does the input contain a file?

Usage

isFile(x)

isAFile(x, nullOk = FALSE)

allAreFiles(x)

Arguments

x

Object.

nullOk

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

Value

TRUE on success; FALSE on failure, with cause set.

Functions

  • isFile(): Vectorized.

  • isAFile(): Scalar.

  • allAreFiles(): Scalar.

Note

Updated 2023-09-29.

See Also

  • file.exists().

  • R.utils::isFile().

Examples

## TRUE ====
x <- "example.txt"
file.create(x)
isAFile(x)
unlink(x)

## FALSE ====
isFile(c("~", "."))

steinbaugh/goalie documentation built on Jan. 17, 2024, 5:16 p.m.