File Watcher Core (fsnotify) #66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tasks
go get github.com/fsnotify/fsnotifyinternal/watcher/watcher.go:NewWatcher(handler func(FileEvent)) (*Watcher, error)Watch(dir string) error— adds dir to fsnotify, records indirsmapUnwatch(dir string) error— removes dir from fsnotify anddirsmapStart()— starts event loop goroutineStop()— closes fsnotify watcher, exits event loopfsnotify.Createevents only (ignore modify/delete/rename)main.go: load allwatched_dirsfrom DB and callwatcher.Watch(dir.Path)Acceptance Criteria
Stop()cleanly exits the event loop