protected override void OnClose(bool cancel) { if (!cancel) { _watcher.Dirs = WatchDirs.Select(i => i.FullPath).ToList(); _watcher.Scan(syncAfterScan: true); } }
private void AddToWatch(FSObject dir) { if (!dir.IsDir()) { return; } if (IsWatching(dir)) { return; } WatchDirs.Add(dir); }
private bool IsWatching(FSObject dir) { return(WatchDirs.Any(i => i.FullPath == dir.FullPath)); }