MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / write_readonly

Function write_readonly

crates/openshell-supervisor-process/src/skills.rs:53–63  ·  view source on GitHub ↗
(path: &Path, contents: &str)

Source from the content-addressed store, hash-verified

51}
52
53fn write_readonly(path: &Path, contents: &str) -> Result<()> {
54 std::fs::write(path, contents).into_diagnostic()?;
55
56 #[cfg(unix)]
57 {
58 use std::os::unix::fs::PermissionsExt as _;
59
60 std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o444)).into_diagnostic()?;
61 }
62 Ok(())
63}
64
65fn install_optional_agents_pointer(root: &Path) -> Option<PathBuf> {
66 let agents_path = root.join(AGENTS_FILE);

Callers 2

install_static_skills_atFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected