(path: &Path)
| 133 | /// Check whether a file is executable. |
| 134 | #[cfg(unix)] |
| 135 | fn is_executable(path: &Path) -> bool { |
| 136 | use std::os::unix::fs::PermissionsExt; |
| 137 | std::fs::metadata(path) |
| 138 | .map(|m| m.permissions().mode() & 0o111 != 0) |
| 139 | .unwrap_or(false) |
| 140 | } |
| 141 | |
| 142 | #[cfg(not(unix))] |
| 143 | fn is_executable(_path: &Path) -> bool { |