Expand description
Filesystem watcher for auto-scanning new/changed audio files, DAW projects, presets, plugins, PDFs, and MIDI.
Uses the notify crate (FSEvents on macOS, inotify on Linux, ReadDirectoryChangesW on Windows) to watch
configured scan directories. On create/modify, classifies paths by extension, maps each path to a scan root
(parent dir for files; bundle dirs as-is), debounces 2s, collapses nested roots, then emits file-watcher-change
with roots_by_category so the UI runs each scanner only on those subtrees.
Structsยง
- File
Watcher State - State for the file watcher.
Constantsยง
- PLUGIN_
EXTS ๐ - Plugin extensions.
Functionsยง
- classify ๐
- Classify a file path into a change category.
- get_
watched_ dirs - Get the list of currently watched directories.
- is_
watching - Check if the watcher is active.
- minimize_
scan_ ๐roots - Drop redundant roots: if
/aand/a/bboth changed, keep only/a. - scan_
root_ ๐for_ changed_ path - Directory to pass to scanners: bundle dirs (
.vst3,.logicx, โฆ) as-is; files use their parent folder. - start_
watching - Start watching the given directories for file changes.
Debounces events and emits
file-watcher-changeto the frontend. - stop_
watching - Stop the file watcher.