tags:

views:

338

answers:

3

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..

A: 
Traveling Tech Guy
Rather than talking to local hardware, I am actually looking from the other end of it .. how to make my abstracted file system appear as a drive in Windows.
esac
+1  A: 

Yes. It's possible and has been successfully done for the ext2 filesystem.

Note that you will need to write your own driver which will require Microsoft signing to be run on some OSes.

Ben S
how is this pure usermode? It's a kernel driver, isn't it??
Tao
+2  A: 

It's difficult. I'd take a look at some projects which have done some of the hard work for you, e.g. Dokan.

Jon Galloway
+1 this worked for me....
kenny
To the best of my understanding Dokan needs to be installed as a kernel-mode driver (Dokan.sys), and only after this can you implement your own user-mode code (optionally in .Net) layered on top...
Tao
There is no way to use Dokan in a commercial project, it is under LGPL license. I would suggest using WebDAV server library (such as http://www.webdavsystem.com/server/) + built-in Windows/Mac OS X drive mounting functionality. Probably this is the fastest way to achieve the result and your server will be standards-compliant in this case.