Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscerningListener ¶
type DiscerningListener interface { Listener WatchDir(info os.FileInfo) bool WatchFile(basename string) bool }
DiscerningListener allows the receiver to selectively watch files.
type Listener ¶
type Listener interface { // Refresh is invoked by the watcher on relevant filesystem events. // If the listener returns an error, it is served to the user on the current request. Refresh() *utils.Error }
Listener is an interface for receivers of filesystem events.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher allows listeners to register to be notified of changes under a given directory.
func NewWatcher ¶
func NewWatcher(paths *model.RevelContainer, eagerRefresh bool) *Watcher
Creates a new watched based on the container
func (*Watcher) Listen ¶
Listen registers for events within the given root directories (recursively).
func (*Watcher) Notify ¶
Notify causes the watcher to forward any change events to listeners. It returns the first (if any) error returned.
func (*Watcher) NotifyWhenUpdated ¶
NotifyWhenUpdated notifies the watcher when a file event is received.
Click to show internal directories.
Click to hide internal directories.