Skip to content

Code Quality: Remove unused members from the storage implementations - #18980

Open
0x5bfa wants to merge 4 commits into
files-community:mainfrom
0x5bfa:core
Open

0x5bfa wants to merge 4 commits into
files-community:mainfrom
0x5bfa:core

Conversation

@0x5bfa

@0x5bfa 0x5bfa commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Resolved / Related Issues

To reduce the confusion by agents, deleted unused FTP storage implementations and other members. Also I merged the three projects into single "Files.Storage" project.

Steps used to test these changes

  1. Build the project.
  2. Create a file dummy.txt in a dir and in another dir.
  3. Copy one from a folder to the other folder.
  4. Check the collision dialog displays correctly, comparing with the stable release.
  5. Create a folder dummy.txt in a dir and in another dir.
  6. Copy likewise.
  7. Check likewise.
@0x5bfa
0x5bfa marked this pull request as ready for review September 20, 2026 15:26
Copilot AI lite review requested due to automatic review settings September 20, 2026 15:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The consolidation introduces interop/config drift risks (manual P/Invokes, duplicated interop definitions, and dropped warnings-as-errors) that should be resolved to ensure builds remain reliable and maintainable.

Review effort: Lite
Findings: None

What changed in this PR

This PR consolidates storage- and interop-related code by removing Files.Core.Storage and Files.App.Storage and moving their APIs/implementations under the single Files.Storage project, updating namespaces and project references accordingly.

Changes:

  • Migrate storage abstractions/implementations to Files.Storage and update consuming app code/projects to reference the new project/namespace.
  • Centralize Win32/COM interop generation into Files.Storage (CsWin32 build task + NativeMethods.*) and add supporting interop helpers/types.
  • Remove now-redundant projects from the solution and repo (Files.Core.Storage, Files.App.Storage, Files.App.CsWin32).
File Description
src/​Files.Storage/​Windows/​WindowsStorable.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​WindowsFolder.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​WindowsFile.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​WindowsBulkOperationsSink.Methods.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​WindowsBulkOperationsEventArgs.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​WindowsBulkOperations.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​WindowsObjectPicker.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​WindowsFolderChangeWatcher.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​WindowsDriveManager.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​WindowsContextMenuType.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​WindowsContextMenuItem.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​TaskbarManager.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​SystemTrayManager.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​STATask.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​JumpListManager.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​JumpListItemType.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​JumpListItem.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Managers/​JumpListDestinationType.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​IWindowsStorable.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​IWindowsFolder.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​IWindowsFile.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Helpers/​WindowsStorableHelpers.Storage.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Helpers/​WindowsStorableHelpers.Shell.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Helpers/​WindowsStorableHelpers.Process.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Helpers/​WindowsStorableHelpers.PowerShell.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Windows/​Helpers/​WindowsStorableHelpers.Icon.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Storables/​DirectStorage/​IDirectMove.cs Namespace moved to Files.Storage.Storables.
src/​Files.Storage/​Storables/​DirectStorage/​IDirectCopy.cs Namespace moved to Files.Storage.Storables.
src/​Files.Storage/​NativeMethods.txt New CsWin32 API surface list for Files.Storage.
src/​Files.Storage/​NativeMethods.json New CsWin32 configuration for Files.Storage.
src/​Files.Storage/​ManualGuid.cs Adds GUID constants via partial CLSID/FOLDERID.
src/​Files.Storage/​Legacy/​RecycleBinWatcher.cs Namespace moved to Files.Storage.Watchers.
src/​Files.Storage/​Legacy/​NativeStorageLegacy/​NativeStorageService.cs Namespace moved to Files.Storage.Storables.
src/​Files.Storage/​Legacy/​HomeFolder/​IHomeFolder.cs Namespace moved to Files.Storage.Storables.
src/​Files.Storage/​Legacy/​HomeFolder/​HomeFolder.cs Namespace moved to Files.Storage.Storables.
src/​Files.Storage/​IStorageService.cs Namespace moved to Files.Storage.
src/​Files.Storage/​IStorageProviderStatusUISourceFactory.cs New COM interface definition (WinRT-related) for status UI integration.
src/​Files.Storage/​IStorageProviderStatusUISource.cs New COM interface definition (WinRT-related) for status UI integration.
src/​Files.Storage/​IStorageProviderStatusUI.cs New COM interface definition (WinRT-related) for status UI integration.
src/​Files.Storage/​IStorageProviderQuotaUI.cs New COM interface definition (WinRT-related) for status UI integration.
src/​Files.Storage/​IOpenControlPanel.cs New COM interface definition for Control Panel activation.
src/​Files.Storage/​IFtpStorageService.cs Namespace moved to Files.Storage.
src/​Files.Storage/​IDetectionAndSharing.cs New COM interface + enums for detection/sharing helper.
src/​Files.Storage/​HStringStringMarshaller.cs New custom marshaller for HSTRING ↔ string.
src/​Files.Storage/​HRESULT.cs Adds debug-only HRESULT helper via partial struct.
src/​Files.Storage/​GlobalUsings.cs Update global usings from old projects to Files.Storage namespaces.
src/​Files.Storage/​Ftp/​FtpStorageService.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Ftp/​FtpStorageFolder.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Ftp/​FtpStorageFile.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Ftp/​FtpStorable.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Ftp/​FtpManager.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Ftp/​FtpHelpers.cs Namespace moved to Files.Storage.
src/​Files.Storage/​Files.Storage.csproj Consolidates package/project references; enables CsWin32 build task.
src/​Files.Storage/​Extras.cs Adds interop helpers/bridges and extra Win32 declarations.
src/​Files.Storage/​Extensions/​StorageExtensions.Service.cs Namespace moved to Files.Storage.Extensions.
src/​Files.Storage/​Extensions/​StorageExtensions.Folder.cs Namespace moved to Files.Storage.Extensions.
src/​Files.Storage/​Extensions/​StorageExtensions.File.cs Namespace moved to Files.Storage.Extensions.
src/​Files.Storage/​EventArguments/​DeviceEventArgs.cs Namespace moved to Files.Storage.EventArguments.
src/​Files.Storage/​Enums/​StorableKind.cs Namespace moved to Files.Storage.Enums.
src/​Files.Storage/​Contracts/​IWatcher.cs Namespace moved to Files.Storage.Contracts.
src/​Files.Storage/​Contracts/​ITrashWatcher.cs Namespace moved to Files.Storage.Contracts.
src/​Files.Storage/​Contracts/​IDeviceWatcher.cs Namespace moved to Files.Storage.Contracts.
src/​Files.Storage/​ComHelpers.cs New COM helper utility.
src/​Files.Storage/​ComHeapPtr`1.cs New CoTaskMem-backed pointer wrapper.
src/​Files.Core.Storage/​GlobalUsings.cs Removed old project file.
src/​Files.Core.Storage/​Files.Core.Storage.csproj Removed old project.
src/​Files.App/​ViewModels/​UserControls/​StatusCenterViewModel.cs Updates TaskbarManager reference to Files.Storage.
src/​Files.App/​GlobalUsings.cs Switch global usings from Files.Core.Storage/Files.App.Storage to Files.Storage.
src/​Files.App/​Files.App.csproj Replace storage-related project references with Files.Storage.
src/​Files.App.Storage/​Files.App.Storage.csproj Removed old project.
src/​Files.App.Server/​NativeMethods.txt Adds CsWin32 NativeMethods for server project.
src/​Files.App.Server/​NativeMethods.json Adds CsWin32 configuration for server project.
src/​Files.App.Server/​Files.App.Server.csproj Adds CsWin32 build task + package; removes old CsWin32 project ref.
Files.slnx Removes split projects and wires solution to Files.Storage.
AGENTS.md Updates contributor guidance to reflect new interop/project layout.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@0x5bfa 0x5bfa changed the title Code Quality: Merge the three unnecessarily split projects into Files.Storage Sep 21, 2026

@Josh65-2201 Josh65-2201 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflict dialogs are working the same as 4.2.37.
Folder don't support it on either showing the below.
Image

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants