MCPcopy Create free account
hub / github.com/RetypeOS/parcode / inspect_file

Method inspect_file

src/inspector.rs:58–68  ·  view source on GitHub ↗

Inspects an already open file.

(file: &ParcodeFile)

Source from the content-addressed store, hash-verified

56impl ParcodeInspector {
57 /// Inspects an already open file.
58 pub fn inspect_file(file: &ParcodeFile) -> Result<DebugReport> {
59 let root = file.root_node()?;
60 let tree = Self::inspect_node(&root)?;
61
62 Ok(DebugReport {
63 file_size: file.file_size(),
64 root_offset: root.offset(),
65 global_version: 4,
66 tree,
67 })
68 }
69
70 /// Convenience wrapper to inspect from path.
71 pub fn inspect<P>(path: P) -> Result<DebugReport>

Callers

nothing calls this directly

Calls 3

root_nodeMethod · 0.80
file_sizeMethod · 0.80
offsetMethod · 0.80

Tested by

no test coverage detected