(&self, path: &Path)
| 173 | } |
| 174 | |
| 175 | pub fn unwatch(&self, path: &Path) -> Result<(), WatcherError> { |
| 176 | self.watched_paths.remove(path); |
| 177 | |
| 178 | if self.watched_paths.is_empty() { |
| 179 | *self.watcher.write() = None; |
| 180 | info!("Stopped all watchers"); |
| 181 | } |
| 182 | |
| 183 | Ok(()) |
| 184 | } |
| 185 | |
| 186 | pub fn stop(&self) { |
| 187 | self.watched_paths.clear(); |