Skip to main content

sibling_binary

Function sibling_binary 

Source
pub fn sibling_binary(exe: &Path, name: &str) -> Result<PathBuf>
Expand description

Locate a sibling binary beside the running one (or beside whichever executable the caller anchors on). This is the one discovery function and the one error mode for everything mdo ships: the binaries always run from the same directory.

The error is a NotFound io error naming the anchor and the path that was checked, so callers can print it as-is instead of inventing their own “not found” story.