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

version (Posix) {
	assert(findExecutable(FileName("ls")) == FilePath("/usr/bin/ls"));
	assert(!findExecutable(FileName("xyz")));
}

Meta