Documentation
¶
Overview ¶
Package recwatch provides recursive file watching events via fsnotify.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Error error Body *fsnotify.Event }
Event represents a watcher event. These can include errors.
type Flags ¶
type Flags struct {
Debug bool
}
Flags contains all the constant flags that recwatch needs.
type RecWatcher ¶
type RecWatcher struct { Path string // computed path Recurse bool // should we watch recursively? Flags Flags // contains filtered or unexported fields }
RecWatcher is the struct for the recursive watcher. Run Init() on it.
func NewRecWatcher ¶
func NewRecWatcher(path string, recurse bool) (*RecWatcher, error)
NewRecWatcher creates an initializes a new recursive watcher.
func (*RecWatcher) Events ¶
func (obj *RecWatcher) Events() chan Event
Events returns a channel of events. These include events for errors.
func (*RecWatcher) Init ¶
func (obj *RecWatcher) Init() error
Init starts the recursive file watcher.
func (*RecWatcher) Watch ¶
func (obj *RecWatcher) Watch() error
Watch is the primary listener for this resource and it outputs events.
Click to show internal directories.
Click to hide internal directories.