Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a user mode filesystem for windows?

Tags:

c#

filesystems

Is it possible to write a filesystem for Windows in pure usermode, or more specifically purely in managed code? I am thinking of something very similar to GMAILFS. Excluding what it is doing under the covers (GMAIL, Amazon, etc..) the main goal would be to provide a drive letter and support all of the basic file operations, and possibly even adding my own structures for storing metadata, etc..

like image 762
esac Avatar asked Sep 11 '09 19:09

esac


1 Answers

Windows provides several approaches to building a user-mode file system for different purposes, depending on your storage location and features that you need to support. Two of them, Projected File System API and Cloud Files API were recently provided as part of the Windows 10 updates.

Windows Projected File System API

Projected File System API is designed to represent some hierarchical data, such as for example Windows Registry, in the form of a file system. Unlike Cloud Files (see below) it does not provide any information about file status and hides the fact that this is not the “real” file system. Example.

Windows Cloud Sync Engine API

Cloud Sync Engine API (Cloud Files API, Cloud Filter API) is used in OneDrive on Windows 10 under the hood. It provides folder content loading during the first request, on-demand files content loading in several different modes, and offline files support. It integrates directly into Windows File Manager and Windows Notification Center and provides file status (offline, in-sync, conflict, pinned) and file content transfer progress. The Cloud Files API runs under regular user permissions and does not require admin privileges for file system mounting or any API calls. Example.

Windows Shell Namespace Extensions API

While Shell Namespace Extension is not a real file system, in many cases you will use it to extend the functionality of the Projected File System and Cloud Files API. For example, you will it to add custom commands to context menus in Windows File Manager as well as you can create nodes that look and behave like a real file system (again, applications would not be able to read or write to such nodes, this is just a user interface). Cloud Files API is using a namespace extension to show your sync root at the top level in Windows File Manager.

like image 192
Andriy Y Avatar answered Sep 28 '22 05:09

Andriy Y