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

Function require_any_rootfs_path

crates/openshell-driver-vm/src/rootfs.rs:886–898  ·  view source on GitHub ↗
(rootfs: &Path, candidates: &[&str])

Source from the content-addressed store, hash-verified

884}
885
886fn require_any_rootfs_path(rootfs: &Path, candidates: &[&str]) -> Result<(), String> {
887 if candidates
888 .iter()
889 .any(|candidate| rootfs.join(candidate.trim_start_matches('/')).exists())
890 {
891 Ok(())
892 } else {
893 Err(format!(
894 "prepared rootfs is missing one of: {}",
895 candidates.join(", ")
896 ))
897 }
898}
899
900fn remove_rootfs_path(rootfs: &Path, relative: &str) -> Result<(), String> {
901 let path = rootfs.join(relative);

Callers 1

validate_sandbox_rootfsFunction · 0.85

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected