Expand description
which
A Rust equivalent of Unix command which(1).
Example:
To find which rustc executable binary is using:
use which::which;
use std::path::PathBuf;
let result = which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
Structs
- An owned, immutable wrapper around a
PathBufcontaining the canonical path of an executable. - An owned, immutable wrapper around a
PathBufcontaining the path of an executable. - A wrapper containing all functionality in this crate.
Enums
Functions
- Find an executable binary’s path by name.
- Find all binaries with
binary_nameusingcwdto resolve relative paths. - Find all binaries with
binary_nameignoringcwd. - Find an executable binary’s path by name, ignoring
cwd. - Find
binary_namein the path listpaths, usingcwdto resolve relative paths. - Find all binaries with
binary_namein the path listpaths, usingcwdto resolve relative paths. - Find all binaries with
binary_namein the path listpaths, ignoringcwd. - Find all binaries matching a regular expression in a the system PATH.
- Find all binaries matching a regular expression in a list of paths.