2016-02-24 02:05:16 +00:00
|
|
|
package filenotify
|
|
|
|
|
2016-10-31 18:22:28 +00:00
|
|
|
import "github.com/fsnotify/fsnotify"
|
2016-02-24 02:05:16 +00:00
|
|
|
|
2016-07-24 05:07:35 +00:00
|
|
|
// fsNotifyWatcher wraps the fsnotify package to satisfy the FileNotifer interface
|
2016-02-24 02:05:16 +00:00
|
|
|
type fsNotifyWatcher struct {
|
|
|
|
*fsnotify.Watcher
|
|
|
|
}
|
|
|
|
|
2016-07-24 05:07:35 +00:00
|
|
|
// Events returns the fsnotify event channel receiver
|
2016-02-24 02:05:16 +00:00
|
|
|
func (w *fsNotifyWatcher) Events() <-chan fsnotify.Event {
|
|
|
|
return w.Watcher.Events
|
|
|
|
}
|
|
|
|
|
2016-07-24 05:07:35 +00:00
|
|
|
// Errors returns the fsnotify error channel receiver
|
2016-02-24 02:05:16 +00:00
|
|
|
func (w *fsNotifyWatcher) Errors() <-chan error {
|
|
|
|
return w.Watcher.Errors
|
|
|
|
}
|