From 7d27d735e24b643888dcc701988be7133a61078f Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 3 Nov 2022 18:24:37 +0800 Subject: [PATCH] Delete FileChangeWatcher.cs --- .../FileChangeWatcher.cs | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 Plugins/Flow.Launcher.Plugin.Program/FileChangeWatcher.cs diff --git a/Plugins/Flow.Launcher.Plugin.Program/FileChangeWatcher.cs b/Plugins/Flow.Launcher.Plugin.Program/FileChangeWatcher.cs deleted file mode 100644 index ab716116f..000000000 --- a/Plugins/Flow.Launcher.Plugin.Program/FileChangeWatcher.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace Flow.Launcher.Plugin.Program -{ - //internal static class FileChangeWatcher - //{ - // private static readonly List WatchedPath = new List(); - // // todo remove previous watcher events - // public static void AddAll(List sources, string[] suffixes) - // { - // foreach (var s in sources) - // { - // if (Directory.Exists(s.Location)) - // { - // AddWatch(s.Location, suffixes); - // } - // } - // } - - // public static void AddWatch(string path, string[] programSuffixes, bool includingSubDirectory = true) - // { - // if (WatchedPath.Contains(path)) return; - // if (!Directory.Exists(path)) - // { - // Log.Warn($"|FileChangeWatcher|{path} doesn't exist"); - // return; - // } - - // WatchedPath.Add(path); - // foreach (string fileType in programSuffixes) - // { - // FileSystemWatcher watcher = new FileSystemWatcher - // { - // Path = path, - // IncludeSubdirectories = includingSubDirectory, - // Filter = $"*.{fileType}", - // EnableRaisingEvents = true - // }; - // watcher.Changed += FileChanged; - // watcher.Created += FileChanged; - // watcher.Deleted += FileChanged; - // watcher.Renamed += FileChanged; - // } - // } - - // private static void FileChanged(object source, FileSystemEventArgs e) - // { - // Task.Run(() => - // { - // Main.IndexPrograms(); - // }); - // } - //} -}