Available
amalgame-io-filewatcher
Cross-OS mtime polling.
Overview
Tree watching for dev tools (hot-reload, livereload, watch tests). No inotify/FSEvents — plain mtime polling, but ultra-portable. Powers Mosaic's dev mode.
Features
- ✓Recursive or shallow watching
- ✓Glob filters (
**/*.am,!node_modules/**) - ✓Unified
OnChange(path, kind)callback (add / modify / delete) - ✓Configurable polling (default 250 ms)
- ✓Cross-OS — no exotic system dep
Example
Minimal usage example — copy-paste runnable after install.
amc package add io-filewatcher
let fw = FileWatcher.New("./src", recursive: true)
fw.OnChange(fn(path, kind) {
Console.WriteLine(kind + " " + path)
rebuild()
})
fw.Start()
At a glance
- License: Apache-2.0
- Install:
amc package add io-filewatcher - Source: amalgame-lang/amalgame-io-filewatcher
- Official index: amalgame-lang/packages-index