#path #executable #locate #env #which

quale

A Rust port of the which utility. Locates an executable in the user’s path.

1 stable release

Uses old Rust 2015

1.0.0 Apr 25, 2016

#6 in #which

Download history 79/week @ 2024-07-26 73/week @ 2024-08-02 101/week @ 2024-08-09 69/week @ 2024-08-16 81/week @ 2024-08-23 70/week @ 2024-08-30 104/week @ 2024-09-06 86/week @ 2024-09-13 143/week @ 2024-09-20 102/week @ 2024-09-27 79/week @ 2024-10-04 75/week @ 2024-10-11 79/week @ 2024-10-18 80/week @ 2024-10-25 85/week @ 2024-11-01 34/week @ 2024-11-08

291 downloads per month
Used in afl-plugin

MIT/Apache

5KB
57 lines

rust-quale

A Rust port of the which utility. Locates an executable in the user’s path.

‘Quale’ is an Italian translation of the English word ‘which’.

Note: rust-quale currently only works on Unix-like operating systems.

Usage

[dependencies]
quale = "1.0"
extern crate quale;

use quale::which;

fn main() {
    assert_eq!(
        which("sh"),
        Some("/bin/sh".into()));

    assert_eq!(
        which("foobar"),
        None);
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~44KB