Skip to main content

executable_name_from_path

Function executable_name_from_path 

Source
pub fn executable_name_from_path(
    path: impl AsRef<Path>,
) -> Result<ExecutableName, CommandNameError>
Expand description

Extracts a validated executable name from a path.

ยงErrors

Returns CommandNameError when the path has no file name, the file name is not Unicode, or the file name is not a valid command name.