(project_root_opt: &Option<ProjectRoot>)
| 214 | .cloned(); |
| 215 | if let Some(archive) = archive { |
| 216 | archive.read_file(virtual_path) |
| 217 | } else { |
| 218 | Err(io::Error::new( |
| 219 | io::ErrorKind::NotFound, |
| 220 | format!("dlc archive mount not found: {name}"), |
| 221 | )) |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | pub fn mount_dlc_disk(name: &str, root: impl AsRef<Path>) -> io::Result<()> { |
| 226 | validate_dlc_name(name)?; |
| 227 | let root = root.as_ref().to_path_buf(); |
| 228 | if !root.exists() { |
no test coverage detected