(path: &Path, recursive: bool)
| 182 | } |
| 183 | |
| 184 | pub fn set_owner(path: &Path, recursive: bool) -> Result<(), Error> { |
| 185 | let mut command = Command::new("chown"); |
| 186 | if recursive { |
| 187 | command.arg("-R"); |
| 188 | } |
| 189 | let path_arg = path.to_string_lossy().into_owned(); |
| 190 | command.args([clawshell_chown_spec(), path_arg.as_str()]); |
| 191 | let op = if recursive { "chown -R" } else { "chown" }; |
| 192 | command_status(&mut command, op) |
| 193 | } |
| 194 | |
| 195 | pub fn set_mode(path: &Path, mode_bits: u32) -> Result<(), Error> { |
| 196 | let mode_str = format_octal_mode(mode_bits); |
no test coverage detected