()
| 96 | } |
| 97 | |
| 98 | func (d *fseventNotify) Close() error { |
| 99 | d.closeOnce.Do(func() { |
| 100 | numberOfWatches.Add(int64(-len(d.stream.Paths))) |
| 101 | |
| 102 | d.stream.Stop() |
| 103 | close(d.errors) |
| 104 | close(d.stop) |
| 105 | }) |
| 106 | |
| 107 | return nil |
| 108 | } |
| 109 | |
| 110 | func (d *fseventNotify) Events() chan FileEvent { |
| 111 | return d.events |