search_path 0.1.0

Provides a very simple search path file finder.
Documentation

Crate search_path

Provides a very simple search path file finder.

MIT License Minimum Rust Version crates.io docs.rs Build Audit GitHub stars


Example

The following example shows the common pattern of finding an executable command on the command line.

use search_path::SearchPath;
use std::path::PathBuf;

fn which_command(cmd_name: &str) -> Option<PathBuf> {
    let search_path = SearchPath::new("PATH").unwrap();
    search_path.find_file(&PathBuf::from(cmd_name))
}

Changes

Version 0.1.0

  • Initial commit.