Import 'which' package version 3.1.1

* Add OWNERS
Bug: 152884384
Test: make

Change-Id: Ic643b3c23001db1124e626548e13e43b27b89c7b
19 files changed
tree: f34f8485c16cb5912c4945ac231f1c937d349517
  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.