Files
PowerToys/Plugins/Wox.Plugin.Program/Programs/UnregisteredPrograms.cs

23 lines
678 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.IO;
2016-08-20 01:17:28 +01:00
namespace Wox.Plugin.Program.Programs
{
[Serializable]
2016-08-19 23:24:21 +01:00
public class UnregisteredPrograms : Win32
{
2016-08-20 01:17:28 +01:00
public static List<Win32> All(List<Settings.ProgramSource> sources, string[] suffixes)
{
2016-08-20 01:17:28 +01:00
List<Win32> programs = new List<Win32>();
foreach (var source in sources)
2016-08-19 20:34:20 +01:00
{
2016-08-20 01:17:28 +01:00
if (System.IO.Directory.Exists(source.Location) && source.MaxDepth >= -1)
{
GetAppFromDirectory(programs, source.Location, source.MaxDepth, suffixes);
}
}
2016-08-20 01:17:28 +01:00
return programs;
}
}
}