Function executable_path

Source
pub fn executable_path() -> Option<PathBuf>
Expand description

Returns the path of the current executable or None if acquiring thereof failed.

ยงExamples:

println!("This executable is at {}", executable_path().unwrap().to_str().unwrap());
Examples found in repository?
examples/simple.rs (line 15)
14fn main() {
15	print_path("executable", whereami::executable_path());
16	print_path("module", whereami::module_path());
17}