Documentation ¶
Overview ¶
Package filenotify is adapted from https://github.com/gohugoio/hugo/blob/master/watcher/filenotify, Apache-2.0 License.
Package filenotify is adapted from github.com/gohugoio/hugo/blob/master/watcher/filenotify, Apache-2.0 License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrWatchExists = errors.New("watch exists")
)
Functions ¶
This section is empty.
Types ¶
type FileWatcher ¶
type FileWatcher interface { Events() <-chan fsnotify.Event Errors() <-chan error Add(name string) error Remove(name string) error Close() error }
FileWatcher is an interface for implementing file notification watchers
func NewEventWatcher ¶
func NewEventWatcher() (FileWatcher, error)
NewEventWatcher returns an fs-event based file watcher
func NewPollingWatcher ¶
func NewPollingWatcher(interval time.Duration) FileWatcher
NewPollingWatcher returns a poll-based file watcher
Click to show internal directories.
Click to hide internal directories.