findExecutable

Find path for a (or FilePath.init if not found) in pathVariableName. TODO: Add caching of result and detect changes via inotify.

@safe
findExecutable
(,
scope const(char)[] pathVariableName = "PATH"
)

Examples

assert(findExecutable(FileName("ls")) == FilePath("/usr/bin/ls"));

Meta