MCPcopy Create free account
hub / github.com/clawshell/clawshell / set_owner

Function set_owner

src/platform/linux.rs:184–193  ·  view source on GitHub ↗
(path: &Path, recursive: bool)

Source from the content-addressed store, hash-verified

182}
183
184pub 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
195pub fn set_mode(path: &Path, mode_bits: u32) -> Result<(), Error> {
196 let mode_str = format_octal_mode(mode_bits);

Callers 2

cmd_onboardFunction · 0.50
backup_openclaw_configFunction · 0.50

Calls 3

command_statusFunction · 0.85
as_strMethod · 0.80
clawshell_chown_specFunction · 0.70

Tested by

no test coverage detected