execute.access: Check Whether File is Executable

View source: R/execute_access.R

execute.accessR Documentation

Check Whether File is Executable

Description

Validates whether a file or command can be executed. Supports both local paths and executables available in system PATH.

Usage

execute.access(path)

Arguments

path

Character string. Executable name or full path.

Value

A list of class execute_access_result containing:

  • path - Resolved executable path

  • exists - TRUE/FALSE

  • executable - TRUE/FALSE

  • in_path - TRUE/FALSE

  • status - Overall status message

Examples


# Check if Rscript is available (available on all R machines)
result <- execute.access("Rscript")
print(result)

# Check a full path to an executable
result <- execute.access(file.path(R.home("bin"), "Rscript"))
print(result)



fileaccess documentation built on June 18, 2026, 1:06 a.m.