Function fetch_section_reference

Source
fn fetch_section_reference(remainder: &str) -> (Section, bool)
Expand description

The Process contains a Section Reference, and this function carefully traverses the Library with best-effort to fetch it.

The sequence looks like this:

  • Use globby finding to match folders to whatever the Process reference is
  • If there is a match, read the file in a more careful way that read_ebml (don’t follow further Section References)
  • If the reference is to another reference, follow that reference to the next file, carefully that is…
  • Limit the length of the daisy-chain to an arbitrary value
  • If you successfully find the source “Section” that isn’t itself a “Section Reference”, then read that Section and return it
  • Throw a flag to indicate success or failure