Skip to content

Feature: Add Everything search & folder size calculation #17336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Files.App/Data/Contracts/IGeneralSettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,20 @@ public interface IGeneralSettingsService : IBaseSettingsService, INotifyProperty
/// Gets or sets a value whether the filter header should be displayed.
/// </summary>
bool ShowFilterHeader { get; set; }

/// <summary>
/// Gets or sets the preferred search engine.
/// </summary>
PreferredSearchEngine PreferredSearchEngine { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to use Everything for folder size calculations.
/// </summary>
bool UseEverythingForFolderSizes { get; set; }

/// <summary>
/// Gets or sets the maximum number of results Everything should return for folder size calculations.
/// </summary>
int EverythingMaxFolderSizeResults { get; set; }
}
}
21 changes: 21 additions & 0 deletions src/Files.App/Data/Enums/PreferredSearchEngine.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Files Community
// Licensed under the MIT License.

namespace Files.App.Data.Enums
{
/// <summary>
/// Defines constants that specify the preferred search engine.
/// </summary>
public enum PreferredSearchEngine
{
/// <summary>
/// Windows Search engine.
/// </summary>
Windows,

/// <summary>
/// Everything search engine.
/// </summary>
Everything,
}
}
9 changes: 9 additions & 0 deletions src/Files.App/Files.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@
<Content Include="7zArm64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Libraries\Everything32.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Libraries\Everything64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Libraries\EverythingARM64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Files.App/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
global using global::System.Text.Json.Serialization;
global using SystemIO = global::System.IO;

// Microsoft Extensions
global using global::Microsoft.Extensions.Logging;

// CommunityToolkit.Mvvm
global using global::CommunityToolkit.Mvvm.ComponentModel;
global using global::CommunityToolkit.Mvvm.DependencyInjection;
Expand Down
6 changes: 6 additions & 0 deletions src/Files.App/Helpers/Application/AppLifecycleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Files.App.Helpers.Application;
using Files.App.Services.SizeProvider;
using Files.App.Utils.Logger;
using Files.App.Utils.Storage.Search;
using Files.App.ViewModels.Settings;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down Expand Up @@ -246,6 +247,11 @@ public static IHost ConfigureHost()
.AddSingleton<IStorageArchiveService, StorageArchiveService>()
.AddSingleton<IStorageSecurityService, StorageSecurityService>()
.AddSingleton<IWindowsCompatibilityService, WindowsCompatibilityService>()
// Search Engine Services
.AddSingleton<WindowsSearchEngineService>()
.AddSingleton<EverythingSearchEngineService>()
.AddSingleton<Files.App.Services.Search.IEverythingSearchService, Files.App.Services.Search.EverythingSearchService>()
.AddSingleton<ISearchEngineSelector, SearchEngineSelector>()
// ViewModels
.AddSingleton<MainPageViewModel>()
.AddSingleton<InfoPaneViewModel>()
Expand Down
Binary file added src/Files.App/Libraries/Everything32.dll
Binary file not shown.
Binary file added src/Files.App/Libraries/Everything64.dll
Binary file not shown.
Binary file added src/Files.App/Libraries/EverythingARM64.dll
Binary file not shown.
Loading
Loading