Expand description
Directory watcher for the Files pane (fs.watch / fs.unwatch).
Sibling of media_file_watcher.rs on the same shared FsWatchPool, with
a different contract: a Files pane re-lists the whole folder on any
change, so this publishes a coalesced “this folder changed” signal per
directory rather than per file, for creates, modifications and removals
alike.
Spec: docs/specs/SPEC_FILE_BROWSER_PANE_2026_10_01.md §6.3, §10.
Structs§
Constants§
- COALESCE 🔒
- Changes to one folder within this window are folded into one event (spec §10: one patch per ~100 ms window, applied within 200 ms).
- EVENT_
FILES_ CHANGED - MPS event telling a Files pane to re-list a folder. Scoped to
block:<id>; payload{ dir }, the folder’s display path exactly asfs.listreturns it. - MAX_
WATCHES_ PER_ BLOCK - Watches one block may hold. Past this the oldest is dropped (spec §10: “hard cap, LRU”). Also bounds what a pane that never unwatches (a window reload skips its dispose) can leak.
Functions§
- publish_
files_ 🔒changed - Publish
EVENT_FILES_CHANGEDfordisplay_dir, scoped to each block. Never a global broadcast.