# files-community/files architecture

> Architecture diagram of the GitHub repository files-community/files, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/files-community/files
- Repository: https://github.com/files-community/files

## Overview

Files is a Windows file manager. The principal workflow is: a user opens Files, navigates or searches a location, the application resolves and enumerates storage items, then an action performs an operation and the UI presents updated state. Distinct stages include presentation, command dispatch, path/item resolution, provider-specific storage, file operations, and shell integrations. The tree documents multitasking, tags, archives, FTP, previews, Git, dialogs, and Windows integrations; several arrows remain conservative because those callers were not sampled.

Main entry points: [`src/Files.App/App.xaml.cs`](https://github.com/files-community/files/blob/main/src/Files.App/App.xaml.cs) (Files App), [`src/Files.App/Data/Commands/Manager/CommandManager.cs`](https://github.com/files-community/files/blob/main/src/Files.App/Data/Commands/Manager/CommandManager.cs) (Command Manager), [`src/Files.App/Actions`](https://github.com/files-community/files/tree/main/src/Files.App/Actions) (File Actions), [`src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs`](https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs) (Path Resolution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_app["Files App<br/>[App.xaml.cs]"]
end

subgraph group_application["Application"]
  node_contexts["App Contexts<br/>[Contexts]"]
  node_command_manager["Command Manager<br/>[CommandManager.cs]"]
  node_actions["File Actions<br/>[Actions]"]
end

subgraph group_storage["Storage Providers"]
  node_listing["Storage Enumerator"]
  node_path_resolution["Path Resolution"]
  node_base_storage["Storage Abstraction"]
  node_windows_storage["Windows Storage<br/>[WindowsFolder.cs]"]
  node_ftp_storage["FTP Storage"]
  node_archive_storage["Archive Storage"]
end

subgraph group_operations["File Operations"]
  node_archive_service["Archive Operations"]
  node_stream_adapter["Stream Adapter"]
end

subgraph group_integrations["Windows Integrations"]
  node_win32_helper["Win32 Storage Helper"]
  node_preview_handler["Preview Handler<br/>[PreviewHandler.cs]"]
  node_open_dialog["Open Dialog"]
  node_save_dialog["Save Dialog"]
end

node_user(("User"))
node_windows_shell["Windows Shell"]
node_ftp_server["FTP Server"]
node_archive_libraries["Archive Libraries"]

node_user -->|"opens app"| node_app
node_app -->|"loads state"| node_contexts
node_app -->|"dispatches commands"| node_command_manager
node_command_manager -->|"invokes actions"| node_actions
node_actions -->|"resolves paths"| node_path_resolution
node_path_resolution -->|"loads items"| node_base_storage
node_listing -->|"enumerates items"| node_windows_storage
node_windows_storage -->|"uses Win32"| node_win32_helper
node_ftp_storage -.->|"reads and writes"| node_ftp_server
node_archive_storage -->|"opens archives"| node_archive_libraries
node_archive_service -->|"compresses and extracts"| node_archive_libraries
node_stream_adapter -->|"opens streams"| node_base_storage
node_preview_handler -->|"hosts previews"| node_windows_shell
node_open_dialog -->|"opens items"| node_windows_shell
node_save_dialog -->|"saves items"| node_windows_shell

click node_app "https://github.com/files-community/files/blob/main/src/Files.App/App.xaml.cs"
click node_contexts "https://github.com/files-community/files/tree/main/src/Files.App/Data/Contexts"
click node_command_manager "https://github.com/files-community/files/blob/main/src/Files.App/Data/Commands/Manager/CommandManager.cs"
click node_actions "https://github.com/files-community/files/tree/main/src/Files.App/Actions"
click node_listing "https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs"
click node_path_resolution "https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs"
click node_base_storage "https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/StorageBaseItems/BaseStorageFolder.cs"
click node_windows_storage "https://github.com/files-community/files/blob/main/src/Files.App.Storage/Windows/WindowsFolder.cs"
click node_ftp_storage "https://github.com/files-community/files/blob/main/src/Files.App.Storage/Ftp/FtpStorageFolder.cs"
click node_archive_storage "https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/StorageItems/ZipStorageFolder.cs"
click node_archive_service "https://github.com/files-community/files/blob/main/src/Files.App/Services/Storage/StorageArchiveService.cs"
click node_stream_adapter "https://github.com/files-community/files/blob/main/src/Files.Core.Storage/Extensions/StorageExtensions.File.cs"
click node_win32_helper "https://github.com/files-community/files/blob/main/src/Files.App/Helpers/Win32/Win32Helper.Storage.cs"
click node_preview_handler "https://github.com/files-community/files/blob/main/src/Files.App/Utils/Shell/PreviewHandler.cs"
click node_open_dialog "https://github.com/files-community/files/blob/main/src/Files.App.OpenDialog/FilesOpenDialog.cpp"
click node_save_dialog "https://github.com/files-community/files/blob/main/src/Files.App.SaveDialog/FilesSaveDialog.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_user toneBlue
class node_contexts,node_command_manager,node_actions toneAmber
class node_listing,node_path_resolution,node_base_storage,node_windows_storage,node_ftp_storage,node_archive_storage,node_ftp_server toneMint
class node_archive_service,node_stream_adapter toneRose
class node_win32_helper,node_preview_handler,node_open_dialog,node_save_dialog,node_windows_shell,node_archive_libraries toneIndigo
```

## Components

### Presentation

- [Files App](https://github.com/files-community/files/blob/main/src/Files.App/App.xaml.cs): `src/Files.App/App.xaml.cs`

### Application

- [App Contexts](https://github.com/files-community/files/tree/main/src/Files.App/Data/Contexts): `src/Files.App/Data/Contexts`
- [Command Manager](https://github.com/files-community/files/blob/main/src/Files.App/Data/Commands/Manager/CommandManager.cs): `src/Files.App/Data/Commands/Manager/CommandManager.cs`
- [File Actions](https://github.com/files-community/files/tree/main/src/Files.App/Actions): `src/Files.App/Actions`

### Storage Providers

- [Storage Enumerator](https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs): `src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs`
- [Path Resolution](https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs): `src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs`
- [Storage Abstraction](https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/StorageBaseItems/BaseStorageFolder.cs): `src/Files.App/Utils/Storage/StorageBaseItems/BaseStorageFolder.cs`
- [Windows Storage](https://github.com/files-community/files/blob/main/src/Files.App.Storage/Windows/WindowsFolder.cs): `src/Files.App.Storage/Windows/WindowsFolder.cs`
- [FTP Storage](https://github.com/files-community/files/blob/main/src/Files.App.Storage/Ftp/FtpStorageFolder.cs): `src/Files.App.Storage/Ftp/FtpStorageFolder.cs`
- [Archive Storage](https://github.com/files-community/files/blob/main/src/Files.App/Utils/Storage/StorageItems/ZipStorageFolder.cs): `src/Files.App/Utils/Storage/StorageItems/ZipStorageFolder.cs`

### File Operations

- [Archive Operations](https://github.com/files-community/files/blob/main/src/Files.App/Services/Storage/StorageArchiveService.cs): `src/Files.App/Services/Storage/StorageArchiveService.cs`
- [Stream Adapter](https://github.com/files-community/files/blob/main/src/Files.Core.Storage/Extensions/StorageExtensions.File.cs): `src/Files.Core.Storage/Extensions/StorageExtensions.File.cs`

### Windows Integrations

- [Win32 Storage Helper](https://github.com/files-community/files/blob/main/src/Files.App/Helpers/Win32/Win32Helper.Storage.cs): `src/Files.App/Helpers/Win32/Win32Helper.Storage.cs`
- [Preview Handler](https://github.com/files-community/files/blob/main/src/Files.App/Utils/Shell/PreviewHandler.cs): `src/Files.App/Utils/Shell/PreviewHandler.cs`
- [Open Dialog](https://github.com/files-community/files/blob/main/src/Files.App.OpenDialog/FilesOpenDialog.cpp): `src/Files.App.OpenDialog/FilesOpenDialog.cpp`
- [Save Dialog](https://github.com/files-community/files/blob/main/src/Files.App.SaveDialog/FilesSaveDialog.cpp): `src/Files.App.SaveDialog/FilesSaveDialog.cpp`

### Other components

- **User**
- **Windows Shell**
- **FTP Server**
- **Archive Libraries**

## Connections

- User → Files App: opens app
- Files App → App Contexts: loads state
- Files App → Command Manager: dispatches commands
- Command Manager → File Actions: invokes actions
- File Actions → Path Resolution: resolves paths
- Path Resolution → Storage Abstraction: loads items
- Storage Enumerator → Windows Storage: enumerates items
- Windows Storage → Win32 Storage Helper: uses Win32
- FTP Storage → FTP Server: reads and writes
- Archive Storage → Archive Libraries: opens archives
- Archive Operations → Archive Libraries: compresses and extracts
- Stream Adapter → Storage Abstraction: opens streams
- Preview Handler → Windows Shell: hosts previews
- Open Dialog → Windows Shell: opens items
- Save Dialog → Windows Shell: saves items
