process_path 0.1.4

Gets the path of the currently executing process or dynamic library.
Documentation
1
2
3
4
5
6
7
use std::fs::read_link;
use std::path::PathBuf;

#[inline]
pub fn get_executable_path() -> Option<PathBuf> {
    read_link("/proc/self/exe").ok()
}