Skip to main content

find_trusted_binary_with_context

Function find_trusted_binary_with_context 

Source
pub fn find_trusted_binary_with_context(
    binary_name: &str,
    app_name: &str,
    context: &BinaryDiscoveryContext,
) -> Option<PathBuf>
Expand description

Look for binary_name inside the install directories of app app_name, in the order they’re typically shipped. Returns the canonical path of the first match that exists and looks executable, or None if no candidate qualifies.

The app_name parameter only affects Windows paths (%ProgramFiles%\<app_name>\…); on Unix the search set is fixed to the common install locations and app_name is unused.