Skip to main content

Module watch

Module watch 

Source
Expand description

Notice when a file changes on disk.

A rebase, a formatter, or another editor writes the file while it is open. Without this the editor neither reloads nor warns, and the next save silently overwrites whatever the other writer did.

Structs§

FileWatch
A live watch. Dropping it stops the watching, which is how opening another file replaces the old watch rather than accumulating them.

Functions§

watch_file
Report changes to path by calling on_change from the watcher’s thread.