#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

#3 in #which

Download history 29/week @ 2023-11-20 46/week @ 2023-11-27 28/week @ 2023-12-04 22/week @ 2023-12-11 34/week @ 2023-12-18 38/week @ 2023-12-25 39/week @ 2024-01-01 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

361 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

~42KB