mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Delete FileChangeWatcher.cs
This commit is contained in:
parent
befa19c4bb
commit
7d27d735e2
1 changed files with 0 additions and 52 deletions
|
|
@ -1,52 +0,0 @@
|
|||
namespace Flow.Launcher.Plugin.Program
|
||||
{
|
||||
//internal static class FileChangeWatcher
|
||||
//{
|
||||
// private static readonly List<string> WatchedPath = new List<string>();
|
||||
// // todo remove previous watcher events
|
||||
// public static void AddAll(List<UnregisteredPrograms> 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();
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
}
|
||||
Loading…
Reference in a new issue