Skip to main content

find_binary

Function find_binary 

Source
pub fn find_binary(name: &str) -> bool
Expand description

Check whether a binary can be found on the system.

For absolute or relative paths (containing /), checks if the file exists. For bare names, searches each directory in the PATH environment variable for an executable with the given name. This is a pure-Rust implementation that avoids shelling out to which or command -v, making it portable across all platforms.