Function module_path

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

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

Note: this is not the Rust mod, but rather an OS module (most of the time: a DLL)

ยงExamples:

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