#executable #env-var #path #finder #path-finding #utility

executable_path_finder

A utility library for finding executable paths

5 releases

0.0.5 Nov 16, 2024
0.0.4 Nov 16, 2024
0.0.3 Sep 26, 2024
0.0.2 Sep 26, 2024
0.0.1 Sep 26, 2024

#638 in Filesystem

Download history 312/week @ 2024-09-23 60/week @ 2024-09-30 12/week @ 2024-10-07 1/week @ 2024-10-14 4/week @ 2024-11-04 185/week @ 2024-11-11 82/week @ 2024-11-18 16/week @ 2024-11-25

287 downloads per month

MIT license

19KB
266 lines

executable_path_finder

find executable path

use executable_path_finder::{find, find_with_cargo_home, find_in_env, find_in_path};

fn main() {
    //find in PATH and env vars
    let path = find("cargo");
    println!("{:?}", path);

    //find in PATH, env vars, and cargo home
    let path = find_with_cargo_home("cargo");
    println!("{:?}", path);

    //find in PATH
    let path = find_in_path("cargo");
    println!("{:?}", path);

    //find in env vars
    let path = find_in_env("cargo");
    println!("{:?}", path);
}

Dependencies

~0.1–7.5MB
~57K SLoC