зеркало из https://github.com/mozilla/gecko-dev.git
b93bf873ba | ||
---|---|---|
.. | ||
src | ||
.cargo-checksum.json | ||
Cargo.toml | ||
LICENSE.txt | ||
README.md |
README.md
which
A Rust equivalent of Unix command "which". Locate installed execuable in cross platforms.
Support platforms
- Linux
- Windows
- macOS
Example
To find which rustc exectable binary is using. Locate installed execuable in cross platforms.
use which::which;
let result = which::which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
Documentation
The documentation is available online.