Support building all variants. am: 04f52bafb3 am: a67390c7f5

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/which/+/1356136

Change-Id: Ifee71ae2af999f9d1f2323e8e478fbe536d708bf
tree: dc23af837f8d718ceef05792cdcf2f7e9fc9a2e5
  1. .cargo_vcs_info.json
  2. .gitignore
  3. .travis.yml
  4. Android.bp
  5. Cargo.toml
  6. Cargo.toml.orig
  7. LICENSE.txt
  8. METADATA
  9. MODULE_LICENSE_BSD_LIKE
  10. OWNERS
  11. README.md
  12. appveyor.yml
  13. src/
  14. tests/
README.md

Travis Build Status Appveyor Build status

which

A Rust equivalent of Unix command “which”. Locate installed executable in cross platforms.

Support platforms

  • Linux
  • Windows
  • macOS

Example

To find which rustc exectable binary is using.

use which::which;

let result = which::which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));

Errors

By default this crate exposes a failure based error. This is optional, disable the default features to get an error type implementing the standard library Error trait.

Documentation

The documentation is available online.