#executable #path #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

#5 in #which

Download history 34/week @ 2024-01-08 34/week @ 2024-01-15 63/week @ 2024-01-22 38/week @ 2024-01-29 52/week @ 2024-02-05 69/week @ 2024-02-12 71/week @ 2024-02-19 93/week @ 2024-02-26 116/week @ 2024-03-04 57/week @ 2024-03-11 76/week @ 2024-03-18 67/week @ 2024-03-25 87/week @ 2024-04-01 57/week @ 2024-04-08 75/week @ 2024-04-15 59/week @ 2024-04-22

285 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

~43KB