Skip to contents

Does the input contain a temporary file (that exists on disk)?

Usage

isTempFile(x)

isATempFile(x)

allAreTempFiles(x)

Arguments

x

Object.

Value

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

Functions

  • isTempFile(): Vectorized.

  • isATempFile(): Scalar.

  • allAreTempFiles(): Scalar.

Note

Updated 2023-07-13.

See also

Examples

## The temporary file must exist on disk.

## TRUE ====
x <- tempfile()
file.create(x)
#> [1] TRUE
file.exists(x)
#> [1] TRUE
isATempFile(x)
#> [1] TRUE
unlink(x)

## FALSE ====
x <- tempfile()
file.exists(x)
#> [1] FALSE
isATempFile(x)
#> [1] FALSE