Crawl resolves the symlink and sends an event for each file in the target path
()
| 77 | |
| 78 | // Crawl resolves the symlink and sends an event for each file in the target path |
| 79 | func (s *Symlink) Crawl() error { |
| 80 | return filepath.Walk(s.TargetPath, func(path string, info os.FileInfo, err error) error { |
| 81 | if err != nil { |
| 82 | return err |
| 83 | } |
| 84 | |
| 85 | s.upstream.events <- &symlinkEvent{ |
| 86 | event: notify.Create, |
| 87 | path: s.rewritePath(path), |
| 88 | } |
| 89 | |
| 90 | return nil |
| 91 | }) |
| 92 | } |
| 93 | |
| 94 | // Stop stops watching on the watching path |
| 95 | func (s *Symlink) Stop() { |
no test coverage detected