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

Function current_uid

crates/openshell-core/src/config.rs:303–307  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301
302#[cfg(all(unix, target_os = "linux"))]
303fn current_uid() -> u32 {
304 use std::os::unix::fs::MetadataExt;
305
306 std::fs::metadata("/proc/self").map_or(0, |metadata| metadata.uid())
307}
308
309#[cfg(not(unix))]
310fn is_unix_socket(path: &Path) -> bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected