MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / read_child

Method read_child

hail-fuzz/src/debugging/replay.rs:417–435  ·  view source on GitHub ↗
(&self, file: &Path)

Source from the content-addressed store, hash-verified

415 }
416
417 pub fn read_child(&self, file: &Path) -> anyhow::Result<Vec<u8>> {
418 match &self.kind {
419 PathKind::Path => {
420 anyhow::ensure!(
421 matches!(self.compression, Compression::None),
422 "attempted to read compressed file as a directory: {}",
423 self.path.display()
424 );
425
426 let file_path = self.path.join(file);
427 std::fs::read(&file_path)
428 .with_context(|| format!("failed to read: {}", file_path.display()))
429 }
430 PathKind::Tar { subpath } => {
431 let file_path = subpath.as_deref().unwrap_or(Path::new("")).join(file);
432 read_within(&self.path, &file_path, &self.compression)
433 }
434 }
435 }
436}
437
438fn read_within(

Callers 1

analyze_crashesFunction · 0.80

Calls 1

read_withinFunction · 0.85

Tested by

no test coverage detected