Function typed_path::utils::current_exe
source · pub fn current_exe() -> Result<NativePathBuf>Expand description
Returns the full filesystem path of the current running executable as NativePathBuf.
§Errors
Returns an Err if unable to parse the path with the native encoding.
Additionally, returns a Err if, as env::current_exe states,
a related filesystem operation or syscall fails.
§Examples
fn main() -> std::io::Result<()> {
let path = typed_path::utils::current_exe()?;
println!("The current executable path is {}", path.display());
Ok(())
}