Documentation ¶
Overview ¶
Package watcher is used to keep an eye on file system events, and trigger actions when those events are of interest.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type WatchHandlerFunc ¶
WatchHandlerFunc takes an fsnotify.Event to add on. A WatchHandlerFunc can assume it will not be called more than once while running
type Watcher ¶
type Watcher struct { // Close should be called when the Watcher is no longer of use. It is safe to call multiple times. Close func() // contains filtered or unexported fields }
Watcher is an implementation of fsnotify.Watcher with some rails and opinions.
func NewWatcher ¶
NewWatcher returns a Watcher or an error if a problem occurred creating it (very rare)
func NewWatcherWithErrorChan ¶
NewWatcherWithErrorChan returns a Watcher or an error if a problem occurred creating it (very rare). The supplied chan will receive non-nil errors if they occur
Click to show internal directories.
Click to hide internal directories.