Skip to main content

classify

Function classify 

Source
pub fn classify(
    content_name: &str,
    paths: &[&Path],
    kind: EventKind,
) -> Vec<Change>
Expand description

What an event in the content directory means, given the content file’s name.

Pure, so the rule is testable without a filesystem or a race. Paths are compared by their final component: notify reports absolute paths, and a rename within the directory arrives as paths that differ only there.

A rename over the content file produces events naming both the temporary sibling and the content file, and both are worth reporting — the first says the application is working, the second is the save.