null when not found.locateTool
fn
string locateTool(string name, string[] extraDirs = ["/usr/sbin",
"/usr/local/sbin", "/sbin"])Searches PATH and additional system tool directories for an executable file.
Parameters
name | Executable file name to look for. |
extraDirs | Directories searched after the PATH entries. Useful for tools such as sshd that live in directories commonly absent from non-login shell paths. |
Returns
Absolute path to the executable, or