Skip to main content

tree_fields_beneath

Function tree_fields_beneath 

Source
pub fn tree_fields_beneath(
    root: &File,
    entries: &[StatEntry],
    index_seconds: u32,
) -> Result<Vec<StatFields>, CleanRefusal>
Expand description

What: Judge every tracked file below the held directory root against its index entry and return the stat fields of each, in entry order, in one walk. Why: The snapshot’s index takes the stat fields of the snapshot’s own files, and the snapshot is proven equal to the source’s index by the same stat data; the same statx serves both, so the files are looked at once, and the fields are the ones the verdict was given on.

In TS you’d write (pseudocode):

const fields = treeFieldsBeneath(root, entries, indexSeconds); // throws a CleanRefusal