Back
which (clj)
(source)function
(which program)
(which program opts)
Returns Path to first executable `program` found in `:paths` `opt`, similar to the which Unix command.
Default for `:paths` is `(exec-paths)`.
On Windows, searches for `program` with filename extensions specified in `:win-exts` `opt`.
Default is `["com" "exe" "bat" "cmd"]`.
If `program` already includes an extension from `:win-exts`, it will be searched as-is first.
When `program` is a relative or absolute path, `:paths` is not consulted. On Windows, the `:win-exts`
variants are still searched. On other OSes, the path for `program` will be returned if executable,
else nil.