fsnotify.go 466 B

123456789101112131415161718
  1. package filenotify
  2. import "github.com/fsnotify/fsnotify"
  3. // fsNotifyWatcher wraps the fsnotify package to satisfy the FileNotifer interface
  4. type fsNotifyWatcher struct {
  5. *fsnotify.Watcher
  6. }
  7. // Events returns the fsnotify event channel receiver
  8. func (w *fsNotifyWatcher) Events() <-chan fsnotify.Event {
  9. return w.Watcher.Events
  10. }
  11. // Errors returns the fsnotify error channel receiver
  12. func (w *fsNotifyWatcher) Errors() <-chan error {
  13. return w.Watcher.Errors
  14. }