mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Moving Plugins from Wox.Plugin.* to Microsoft.Plugin.*. This is to rename the assemblies that get saved to the settings directory. External plugins will get saved to their on assembly folder in the future.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Wox.Infrastructure.Logger;
|
||||
using Microsoft.Plugin.Program.Programs;
|
||||
|
||||
namespace Microsoft.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();
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user