(path: &Path, mode_bits: u32)
| 244 | } |
| 245 | |
| 246 | pub fn set_mode(path: &Path, mode_bits: u32) -> Result<(), Error> { |
| 247 | let mode_str = format_octal_mode(mode_bits); |
| 248 | let path_arg = path.to_string_lossy().into_owned(); |
| 249 | let mut command = Command::new("chmod"); |
| 250 | command.args([mode_str.as_str(), path_arg.as_str()]); |
| 251 | command_status(&mut command, "chmod") |
| 252 | } |
| 253 | |
| 254 | #[cfg(test)] |
| 255 | mod tests { |
nothing calls this directly
no test coverage detected