Skip to contents

Lightweight, convenience wrapper around base::Sys.which() and base::normalizePath().

Also provided via the alias sys_where() meant to associate with where.exe on Windows.

Usage

sys_which(x, winslash = "/", ...)

sys_where(x, winslash = "/", ...)

Arguments

x

Passed to Sys.which() names argument.

...

Arguments passed on to normalize_path

path

character vector of file paths.

winslash

the separator to be used on Windows – ignored elsewhere. Must be one of c("/", "\\").

Value

Character vector of paths, if found. If not found returns NULL instead of "".

Examples

if (FALSE) { # \dontrun{
sys_which("gdal")
} # }