(path: &Path, permissions: u16)
| 81 | /// Set permissions on a path. |
| 82 | #[cfg(unix)] |
| 83 | pub(crate) fn set_permissions(path: &Path, permissions: u16) -> io::Result<()> { |
| 84 | use std::os::unix::fs::PermissionsExt; |
| 85 | let perms = fs::Permissions::from_mode(permissions as u32); |
| 86 | fs::set_permissions(path, perms) |
| 87 | } |
| 88 | |
| 89 | /// Set permissions on a path (non-Unix fallback). |
| 90 | #[cfg(not(unix))] |