| 36 | } |
| 37 | |
| 38 | type fsnotifyWatcher struct { |
| 39 | *fsnotify.Watcher |
| 40 | |
| 41 | mu sync.Mutex // Protects following. |
| 42 | watchedFiles map[string]bool // Files being watched (absolute path -> bool). |
| 43 | watchedDirs map[string]int // Refcount of directories being watched (absolute path -> count). |
| 44 | closed bool // Protects closing of done. |
| 45 | done chan struct{} |
| 46 | } |
| 47 | |
| 48 | // NewFSNotify creates a new file system watcher that watches parent directories |
| 49 | // instead of individual files for more reliable event detection. |
nothing calls this directly
no outgoing calls
no test coverage detected