Crate which

source ·
Expand description

which

A Rust equivalent of Unix command which(1).

Example:

To find which rustc executable binary is using:

use which::which;

let result = which::which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));

Structs

Enums

Functions

Find a exectable binary’s path by name.
Find binary_name in the path list paths, using cwd to resolve relative paths.

Type Definitions