Documentation
¶
Overview ¶
Package devloop implements the polling file watcher behind `rastrillo dev` (design doc §11). Polling rather than a notify dependency, per the family's hand-roll-page-of-code convention (cmd/rastrillo/ modpath.go): portable, zero deps, and a 250ms poll of a small source tree sits far inside §11's ~2s save-to-serving target.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Snapshot ¶
Snapshot fingerprints every regular file under each root/dirs entry, keyed by slash-separated path relative to root. Missing dirs are skipped, not errors: a fresh `rastrillo new` app has no app/ or manifest/ yet. Files vanishing mid-walk are skipped for the same reason — the next poll settles it.
Types ¶
type Stamp ¶
Stamp fingerprints one file: size plus mtime is enough to detect an edit without hashing content. Known limit: on filesystems with coarse (e.g. 1s) mtime granularity, a same-size edit landing inside the same tick as a previous stat can be missed until the next change; ext4 and APFS give mtimes nanosecond granularity, so this is a non-issue on dev machines.