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

Function create_sandbox_mountpoint

crates/openshell-driver-vm/src/rootfs.rs:417–427  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

415}
416
417fn create_sandbox_mountpoint(path: &Path) -> Result<(), String> {
418 fs::create_dir_all(path).map_err(|e| format!("create {}: {e}", path.display()))?;
419 #[cfg(unix)]
420 {
421 use std::os::unix::fs::PermissionsExt as _;
422
423 fs::set_permissions(path, fs::Permissions::from_mode(0o755))
424 .map_err(|e| format!("chmod {}: {e}", path.display()))?;
425 }
426 Ok(())
427}
428
429fn rootfs_image_size_bytes(source: &Path) -> Result<u64, String> {
430 let used = directory_size_bytes(source)?;

Callers 1

prepare_sandbox_rootfsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected