(path: &Path)
| 34 | } |
| 35 | |
| 36 | fn set_executable(path: &Path) { |
| 37 | #[cfg(unix)] |
| 38 | { |
| 39 | let mut permissions = fs::metadata(path).unwrap().permissions(); |
| 40 | permissions.set_mode(0o755); |
| 41 | fs::set_permissions(path, permissions).unwrap(); |
| 42 | } |
| 43 | |
| 44 | #[cfg(not(unix))] |
| 45 | { |
| 46 | let _ = path; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | fn path_string_ends_with_components(path: &str, suffix: &[&str]) -> bool { |
| 51 | let normalized = path.replace('\\', "/"); |
no test coverage detected