logo

Function watchexec::paths::summarise_events_to_env[][src]

pub fn summarise_events_to_env<'events>(
    events: impl IntoIterator<Item = &'events Event>
) -> HashMap<&'static str, OsString>
Expand description

Summarise Events as a set of environment variables by category.

  • CREATED -> Create(_)
  • META_CHANGED -> Modify(Metadata(_))
  • REMOVED -> Remove(_)
  • RENAMED -> Modify(Name(_))
  • WRITTEN -> Modify(Data(_)), Access(Close(Write))
  • OTHERWISE_CHANGED -> anything else
  • plus COMMON with the common prefix of all paths (even if there’s only one path).

It ignores non-path events and pathed events without event kind. Multiple events are sorted in byte order and joined with the platform-specific path separator (: for unix, ; for Windows).