(path string, ch chan bool)
| 15 | ) |
| 16 | |
| 17 | func WatcherDestroyer(path string, ch chan bool) { |
| 18 | for { |
| 19 | if utils.GetClientsCount(path) == 0 { |
| 20 | cache.EditorWatcherCache.Delete(path) |
| 21 | ch <- true |
| 22 | return |
| 23 | } |
| 24 | time.Sleep(3 * time.Second) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | func SetupWatcher(path string, stopChan chan bool) { |
| 29 | watcher, err := fsnotify.NewWatcher() |
no test coverage detected