pub struct Scan {
pub entries: BTreeMap<String, ScanEntry>,
pub held: BTreeSet<String>,
}Expand description
What a walk found: every regular file it could stat, and every path
it was refused (held).
Fields§
§entries: BTreeMap<String, ScanEntry>§held: BTreeSet<String>Paths the syncer may not read (EACCES or EPERM, which std reports
alike as PermissionDenied: either is a refusal the tree’s owner
set), each standing for itself and everything under it: a
directory it may not list (written with
its trailing /), an entry it may not lstat (a name in a directory
it may list but not search, so even its type is unknown). And a
file or directory whose name is not UTF-8, which no key can name:
held under its lossy form (read_dir_entries). The
barrier adds the files it may not open and the absences it may not
confirm. Nothing held is published or deleted, and no boundary is
complete while anything is held.
Implementations§
Source§impl Scan
impl Scan
Sourcepub fn holds(&self, path: &str) -> bool
pub fn holds(&self, path: &str) -> bool
Whether path is held: a held path itself, or under one.
Sourcepub fn present<'a, V>(
&'a self,
cited: &'a BTreeMap<String, V>,
) -> impl Iterator<Item = &'a String> + 'a
pub fn present<'a, V>( &'a self, cited: &'a BTreeMap<String, V>, ) -> impl Iterator<Item = &'a String> + 'a
What prev_scan records after this scan, in order: every path the
walk saw, and every path in cited that it held. A held path is
unseen, not absent, so it is recorded PRESENT: a path that turns
out to be gone once it is readable again is then a first absence,
and the two-scan rule withholds its delete one more scan, exactly
as for a path seen a scan ago.