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

Function set_mode

src/platform/macos.rs:246–252  ·  view source on GitHub ↗
(path: &Path, mode_bits: u32)

Source from the content-addressed store, hash-verified

244}
245
246pub 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)]
255mod tests {

Callers

nothing calls this directly

Calls 3

format_octal_modeFunction · 0.85
command_statusFunction · 0.85
as_strMethod · 0.80

Tested by

no test coverage detected