(path: &Path)
| 9485 | |
| 9486 | #[cfg(unix)] |
| 9487 | fn is_executable(path: &Path) -> bool { |
| 9488 | use std::os::unix::fs::PermissionsExt; |
| 9489 | fs::metadata(path) |
| 9490 | .map(|metadata| metadata.permissions().mode() & 0o111 != 0) |
| 9491 | .unwrap_or(false) |
| 9492 | } |
| 9493 | |
| 9494 | #[cfg(not(unix))] |
| 9495 | fn is_executable(path: &Path) -> bool { |
no test coverage detected