findExecutable

Find executable by fileName in the paths.

  1. string findExecutable(string fileName, Paths paths, Exts extensions)
    string
    findExecutable
    (
    Paths
    Exts
    )
    (
    string fileName
    ,
    Paths paths
    ,)
    if (
    isInputRange!Paths &&
    is(ElementType!Paths : string)
    &&
    isInputRange!Exts
    &&
    is(ElementType!Exts : string)
    )
  2. string findExecutable(string fileName, Paths paths)
  3. string findExecutable(string fileName)

Parameters

fileName string

Name of executable to search. Should be base name or absolute path. Relative paths will not work. If it's an absolute path, this function does not try to append extensions.

paths Paths

Range of directories where executable should be searched.

extensions Exts

Range of extensions to append during searching if fileName does not have extension.

Return Value

Type: string

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

See Also

binPaths, executableExtensions

Meta