Skip to main content

watch

Function watch 

Source
pub fn watch(
    root: &Path,
    recursive: bool,
    per_dir: bool,
    hints: HintSender,
) -> Result<WatchBackend>
Expand description

Arm a native watch on root feeding hints. Must be called before the engine’s initial enumeration so nothing slips between scan and arm. With per_dir (see per_dir_watching_pays) only root is armed here and the reconciler arms the rest as it enumerates, so excluded subtrees never cost a descriptor.