Skip to main content

process_executable_dir

Function process_executable_dir 

Source
pub fn process_executable_dir() -> Option<PathBuf>
Available on crate feature v2_92 only.
Expand description

Gets the absolute path to the directory containing the currently running executable.

This is useful for locating application resources relative to the installation directory.

The returned path is cached on first call and remains constant for the lifetime of the program. So, it must not be freed or modified.

§Returns

the absolute path to the directory containing the program’s executable, or NULL if not found