MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / file_mode

Function file_mode

libatomic/examples/agent_sandbox_bench.rs:551–554  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

549
550#[cfg(unix)]
551fn file_mode(path: &Path) -> Result<u32> {
552 use std::os::unix::fs::PermissionsExt;
553 Ok(fs::metadata(path)?.permissions().mode() & 0o7777)
554}
555
556/// Full sandboxes hold every tracked file; partial sandboxes hold exactly
557/// the east subtree and nothing else from the west or the root.

Callers

nothing calls this directly

Calls 2

modeMethod · 0.45
permissionsMethod · 0.45

Tested by

no test coverage detected