#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 59/week @ 2024-03-13 76/week @ 2024-03-20 69/week @ 2024-03-27 80/week @ 2024-04-03 61/week @ 2024-04-10 71/week @ 2024-04-17 58/week @ 2024-04-24 65/week @ 2024-05-01 65/week @ 2024-05-08 67/week @ 2024-05-15 103/week @ 2024-05-22 82/week @ 2024-05-29 56/week @ 2024-06-05 71/week @ 2024-06-12 63/week @ 2024-06-19 58/week @ 2024-06-26

270 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