2016-02-23 21:05:16 -05:00
|
|
|
package filenotify
|
|
|
|
|
|
|
|
import "gopkg.in/fsnotify.v1"
|
|
|
|
|
2016-07-24 01:07:35 -04:00
|
|
|
// fsNotifyWatcher wraps the fsnotify package to satisfy the FileNotifer interface
|
2016-02-23 21:05:16 -05:00
|
|
|
type fsNotifyWatcher struct {
|
|
|
|
*fsnotify.Watcher
|
|
|
|
}
|
|
|
|
|
2016-07-24 01:07:35 -04:00
|
|
|
// Events returns the fsnotify event channel receiver
|
2016-02-23 21:05:16 -05:00
|
|
|
func (w *fsNotifyWatcher) Events() <-chan fsnotify.Event {
|
|
|
|
return w.Watcher.Events
|
|
|
|
}
|
|
|
|
|
2016-07-24 01:07:35 -04:00
|
|
|
// Errors returns the fsnotify error channel receiver
|
2016-02-23 21:05:16 -05:00
|
|
|
func (w *fsNotifyWatcher) Errors() <-chan error {
|
|
|
|
return w.Watcher.Errors
|
|
|
|
}
|