mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
23 lines
623 B
C#
23 lines
623 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Flow.Launcher.Plugin.Explorer.Search
|
|
{
|
|
public class SearchManager
|
|
{
|
|
public List<Result> TopLevelFolderSearch(
|
|
Func<string, List<Result>> windowsIndexSearch,
|
|
Func<string, List<Result>> directoryInfoClassSearch,
|
|
Func<string, bool> indexExists,
|
|
string path)
|
|
{
|
|
var results = windowsIndexSearch(path);
|
|
|
|
if (results.Count == 0 && !indexExists(path))
|
|
return directoryInfoClassSearch(path);
|
|
|
|
return results;
|
|
}
|
|
}
|
|
}
|