You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
703 B
Markdown
25 lines
703 B
Markdown
# Notes
|
|
|
|
(new notes at the top)
|
|
|
|
## TODO: Incremental Watcher
|
|
|
|
The DAG based incremental rebuilding will require a better file watcher that can whats entire directories and automatically recheck build rules when a new file is created.
|
|
|
|
```go
|
|
type WatchListener func(path string) error
|
|
|
|
type Watcher interface {
|
|
// OnFileChange will register a file change listener
|
|
OnFileChange(l WatchListener)
|
|
|
|
// OnFileAdded will register a file creation listener
|
|
OnFileAdded(l WatchListener)
|
|
|
|
// Watch will register "path"
|
|
Watch(path string) error
|
|
|
|
// Watch will register files matching "pattern" and all directories along the way for new files
|
|
WatchPattern(pattern string) error
|
|
}
|
|
``` |