findExecutable

Finds executable by fileName in the paths specified by paths.

  1. string findExecutable(string fileName, Range paths)
    @trusted nothrow
    string
    findExecutable
    (
    Range
    )
    (
    string fileName
    ,
    Range paths
    )
    if (
    is(ElementType!Range : string)
    )
  2. string findExecutable(string fileName)

Parameters

fileName string

Name of executable to search. If it's absolute path, this function only checks if the file is executable.

paths Range

Range of directories where executable should be searched. 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