private bool UseWindowsIndexForDirectorySearch(string locationPath) { if (!settings.UseWindowsIndexForDirectorySearch) { return(false); } if (settings.IndexSearchExcludedSubdirectoryPaths .Any(x => FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath) .StartsWith(x.Path, StringComparison.OrdinalIgnoreCase))) { return(false); } return(indexSearch.PathIsIndexed(locationPath)); }