1. Project Overview & Quickstart (files-community/Files)
Files
A modern file manager that helps users organize their files and folders.
Repository Details
- Repository: files-community/Files
- GitHub Stars: β 44,609
- Primary Language: C#
Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.
2. Official Technical Reference & Guides (files-community/files-community.github.io)
File: README.md
[files-community.github.io](https://files-community.github.io/)
This repository contains the website of Files, a modern file explorer that pushes the boundaries of the platform.
You can find the source code of Files here.
To improve existing documentation or add new documentation, edit the corresponding file in ./docs or add a new file in the docs folder.
The source code of the start page can be found at the root (index.html).
Have ideas or found a mistake? Feel free to file an issue or create a PR!
About Files
Files is a file manager which leverages the latest features of the Windows platform including Fluent Design, seamless updates, and APIs which enable the performance and lifecycle behavior that users expect. Whether you want to simplify your experience with your files or try something new, Files is a one-stop solution for exploring your files on the fly.
Where to get Files
File: docs/articles/building-extensions.md
Building Extensions
File preview service
Files locates the name of the preview service by reading the service property registered in the app manifest. Your manifest should look something like this:
<Extensions>
<Service>com.markdownpreview.controlservice</Service>
</Extensions>Files also looks at the FileExtensions.json file to get a list of file extensions that the preview service is registered for. If the selected file has an extension listed within this file, then Files will call the extension's service.
Preview controls
Previews are sent as a string containing xaml that is then loaded into the preview pane using the XamlReader. You can define this string as the "preview" parameter in the response. This does have it's limitations, as only controls that are already avaliable to Files can be used. This means that extensions are limited to standard WinUI controls, and controls from the Windows Community Toolkit.
This is an example of a string that can be sent back to Files.
<controls:MarkdownTextBlock xml:space="preserve" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls">
<controls:MarkdownTextBlock.Text>
Hello, world!
</controls:MarkdownTextBlock.Text>
</controls:MarkdownTextBlock>Preview Images
Since images can't be sent in the response, Files allows images to be loaded as Base64 string that represents the images buffer. See the sample service for an example of this.
This is an
This is an example of how you would encode your image as a base64 string, and add that to the xaml string.
var base64string = "";
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/FilesHome.png"));
var stream = await file.OpenReadAsync();
using (var memoryStream = new MemoryStream())
{
memoryStream.Capacity = (int)stream.Size;
var ibuffer = memoryStream.GetWindowsRuntimeBuffer();
ibuffer = await stream.ReadAsync(ibuffer, (uint)stream.Size, InputStreamOptions.None).AsTask().ConfigureAwait(false);
var byteArray = ibuffer.ToArray();
base64string = Convert.ToBase64String(byteArray);
}
var xaml = $"<ScrollViewer xml:space=\"preserve\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:controls=\"using:Files.UserControls\">
<controls:StringEncodedImage>
<controls:StringEncodedImage.EncodedImage>
{base64string}
</controls:StringEncodedImage.EncodedImage>
<controls:StringEncodedImage>
</ScrollViewer>Details
File details are sent as a Json string with the parameter name "details", which is deserialized by Files, and then added to the details list in the preview pane.
The two Properties you will need for this are "LocalizedName" and "Value" of types string and object, respectively.
This is an example of valid Json data that can be used by Files.
[
{
"LocalizedName": "Hello",
"Value": "World!",
}
]Specifying file types
Preview extensions can specify the types of files they support by adding them to a json list in a file named FileExtensions.json in the extension's public folder.
Also check out the preview extensions sample repository.
File: docs/articles/building-source.md
Building Files from source
Install Microsoft Visual Studio 2017 or later and the UWP Development kit.
Clone the repository and open
Files.slnin VS.Make sure that
Files.Packageis set as the startup item by right-clicking onFiles.Packagein the solution explorer and hitting 'Set as Startup item'.In the architecture pane, select
Files.Package, x64* asDebugwhich should look like this:You're good to go!
*If x64 doesn't work, use the architecture of your system
File: docs/articles/code-style.md
Code Style
1. DO use PascalCase:
- class names
- method names
- const names
2. DO use camelCase:
- method arguments
- local variables
- private fields
3. DO NOT use Hungarian notation.
4. DO NOT use underscores, hyphens, or any other nonalphanumeric characters.
5. DO NOT use Caps for any names.
6. DO use predefined type names like int, string etc. instead of Int32, String.
7. DO use I prefix for Interface names.
8. DO vertically align curly brackets.
9. DO NOT use Enum or Flag(s) suffix for Enum names.
10. DO use prefix Is, Has, Have, Any, Can or similar keywords for Boolean names.
11. DO use curly brackets for single line if, for and foreach statements.
File: docs/articles/configure-win-e.md
Configuring Files to launch with the Win + E shortcut
Option 1: using an AutoHotkey script
You can configure Files to launch using the Win + E shortcut by using this AutoHotKey script:
; Win + E
#e::
FilesTitle := "Files ahk_class ApplicationFrameWindow ahk_exe ApplicationFrameHost.exe"
FilesLocation := USERPROFILE . "\AppData\Local\Microsoft\WindowsApps\files.exe"
if WinExist(FilesTitle) {
WinActivate % FilesTitle ; Set focus
SendInput ^t ; Send CTRL + t shortcut to open a new tab
} else {
Run % FilesLocation ; Start Files
WinWait % FilesTitle ; Wait for it ...
WinActivate % FilesTitle ; Set focus
}
returnOption 2: modifying the registry
You can also configure Files to launch using the Win + E shortcut without an external program by editing the registry:
This method involves modifying the registry, make sure to create a backup beforehand and proceed at your own risk. Please keep in mind that this method is unsupported and may not work for everyone.
With automatic script
- Create a backup of the registry, make sure to store the backup in your desktop folder so that you can access it in the event that Files won't open.
- Download this archive and extract both of the contained .reg files to the desktop
- Run
OpenFilesOnWinE.regto open Files on Win+E - Run
UndoOpenFilesOnWinE.regto restore windows explorer
Manually
- Create a backup of the registry, make sure to store the backup in your desktop folder so that you can access it in the event that Files won't open.
- Open the registry editor
- Navigate to
HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID - Create a key named
{52205fd8-5dfb-447d-801a-d0b52f2e83e1} - Create a key named
shellunder{52205fd8-5dfb-447d-801a-d0b52f2e83e1} - Create a key named
opennewwindowundershell - Create a key named
commandunderopennewwindowand set the default key value to:C:\Users\<YOURUSERNAME>\AppData\Local\Microsoft\WindowsApps\files.exe
File: docs/articles/custom-themes.md
Custom Themes
Files allows you to customize the application with custom themes by modifying xaml resource dictionaries, this allows users to override the default brushes used throughout the app.
Themes are loaded from the Themes folder in the app's LocalState folder. A drop-down (Custom theme) is located in Appearance settings that allows you to select a custom theme.
Quick start
Open your text editor of choice, and paste in the template located below. Then, save the file as
%userprofile%\AppData\Local\Packages\49306atecsolution.FilesUWP_et10x9a9vyk8t\LocalState\Themes\test1.xaml.Change some of the color values around.
Change the selected theme from the appearance settings page.
Files will now use your custom theme. If you add more themes, you can switch between them using the dropdown.
Default template
/* Detailed source-code truncated for AI context efficiency. */You can also use the Fluent XAML Theme Editor to easily modify custom themes.
You can view other themes and contribute your own here.
File: docs/articles/date-formats.md
Date Formats
Files comes with two different options to let you customize the date format.
Application
The default date format uses the following format Wednesday, June 3, 2020.
System
System is a little more compact and uses this format 6/3/2020.
File: docs/articles/keyboard-shortcuts.md
Keyboard Shortcuts
Files comes with built in keyboard shortcuts to make naviagting the app easier.
| Shortcut | Action |
|---|---|
Ctrl + C |
Copy |
Ctrl + X |
Cut |
Ctrl + V |
Paste |
Ctrl + T |
Create new tab |
Ctrl + W |
Close tab |
Ctrl + F4 |
Close tab |
Ctrl + Shift + T |
Reopen recently closed tab |
Ctrl + Tab |
Switch tab |
Ctrl + N |
New window |
Ctrl + Shift + N |
New file |
File: docs/articles/languages.md
This site in other languages
File: docs/articles/performance-settings.md
Performance Settings
You can improve the performance of Files by modifying the following settings in the Experimental settings page.
Cache files and folders
After navigating to a directory, Files can cache the files/folders list and use it the next time you navigate to the same directory (this should result in the list of items loading faster).
Preemptive cache parallel limit
To further increase performance when navigating to a directory, you can set up preemptive caching. After navigating to any directory, the preemptive cache will go through all the folders in this directory and save them into the cache. This can make navigating into sub directories faster.
Preemptive caching is an expensive job for both the disk and also a little bit on the CPU. This is why you can set the parallel limit for this operations. If you set it to 0, then the preemptive cache will be turned off. For faster drives, such as NVMe drives, the limit can be set higher with less of an impact on your device.