(path: &Path)
| 415 | } |
| 416 | |
| 417 | fn 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 | |
| 429 | fn rootfs_image_size_bytes(source: &Path) -> Result<u64, String> { |
| 430 | let used = directory_size_bytes(source)?; |
no outgoing calls
no test coverage detected