pub fn resolve(dir: &Path, name: &str) -> Result<PathBuf, String>Expand description
Turn name into the file to run, or a sentence saying why it will not be.
The refusals, in the order they are checked: an empty name, an absolute path, a path
separator, .., a file that does not exist, one that resolves outside dir once symlinks
are followed, one that is not a regular file, and one that is not executable. The returned
path is canonical, so what was checked is what runs.