findExecutable

Finds executable by fileName in the paths specified by paths.

string
findExecutable
(
string fileName
,
in string[] paths = []
)

Parameters

fileName string

name of executable to search

paths string[]

array of directories where executable should be searched. If not set, search in system paths, usually determined by PATH environment variable Note: on Windows when fileName extension is omitted, executable extensions will be automatically appended during search.

Return Value

Type: string

absolute path to the existing executable file or an empty string if not found.

Meta