Versions in this module Expand all Collapse all v0 v0.0.1 Oct 13, 2023 Changes in this version + var ErrDurationTooShort = errors.New("error: duration is less than 1ns") + var ErrSkip = errors.New("error: skipping file") + var ErrWatchedFileDeleted = errors.New("error: watched file or folder deleted") + var ErrWatcherRunning = errors.New("error: watcher is already running") + type Event struct + OldPath string + Path string + func (e Event) String() string + type FilterFileHookFunc func(info os.FileInfo, fullPath string) error + func RegexFilterHook(r *regexp.Regexp, useFullPath bool) FilterFileHookFunc + type Op uint32 + const Chmod + const Create + const Move + const Remove + const Rename + const Write + func (e Op) String() string + type Watcher struct + Closed chan struct{} + Error chan error + Event chan Event + func New() *Watcher + func (w *Watcher) Add(name string) (err error) + func (w *Watcher) AddFilterHook(f FilterFileHookFunc) + func (w *Watcher) AddRecursive(name string) (err error) + func (w *Watcher) Close() + func (w *Watcher) FilterOps(ops ...Op) + func (w *Watcher) Ignore(paths ...string) (err error) + func (w *Watcher) IgnoreHiddenFiles(ignore bool) + func (w *Watcher) Remove(name string) (err error) + func (w *Watcher) RemoveRecursive(name string) (err error) + func (w *Watcher) SetMaxEvents(delta int) + func (w *Watcher) Start(d time.Duration) error + func (w *Watcher) TriggerEvent(eventType Op, file os.FileInfo) + func (w *Watcher) Wait() + func (w *Watcher) WatchedFiles() map[string]os.FileInfo