Does the input contain a symbolic link?

isSymlink(x)

isASymlink(x, nullOK = FALSE)

allAreSymlinks(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

  • isSymlink: Vectorized.

  • isASymlink: Scalar.

  • allAreSymlinks: Scalar.

Note

Updated 2020-07-24.

Supported on Linux and macOS but not Windows.

See also

Examples

if (!isTRUE(isWindows())) { from <- "from.txt" to <- "to.txt" file.create(from) file.symlink(from = from, to = to) isSymlink(c(from, to)) unlink(c(from, to)) }