Tuesday, May 27, 2008

Windows FUSE "Dokan" become open source !!

Yesterday, Dokan - Windows FUSE - become open source (LGPL)!


FUSE is "File system in User space". Usually, you have to write code for kernel mode to make file system. FUSE is a library which callbacks from the kernel mode to the user mode when there is a access to the file system. With FUSE, creating file system gets extremely easy.

There is a FUSE for Linux and Mac OS X. But there were no FUSE for Windows for a long time. Currently, most of the kernels of OS is open source, but Windows kernel is still close source. Making FUSE for Windows is difficult task, because information is not enough. But Hiroki Asakawa created it !!! Wow !!! It looks simple, but you will know how diffcult it is if you try to make it.

For Dokan, I can make softwares which I wanted to make for a few years!

As Dokan become open source, I improved it for 5 points.

1. Support Windows 2000

I don't know why, but Dokan doesn't work on Windows 2000. So I made a patch.


It's a patch for device driver, but you need to recompile user mode application, such as NT service. I checked that I can launch Firefox with the next mirror patch.

2. Add "-noLockOnSource" option to mirror file system

Dokan has the sample "mirror". This samples creates mirror file system. But if you mirror completely, there will be a strong lock to the mirrored file, when you execute exe files. Then you cannot launch exe applications on mirror file system. At first, I didn't notice that this is a lock problem. I thought this is a Dokan bug. So I add -noLockSource option to mirror file system, which doesn't lock on mirrored files.

mirror.exe -noLockOnSource "C:\Program Files\Mozilla Firefox" S:

With this command, I checked that I can launch Firefox by S:\firefox.exe


3. Java Wrapper - JDokan

Dokan can use C, .NET, Ruby. I also added to support Java. The name is JDokan, and the license is LGPL.


4. MemoryFS

With JDokan, I created a file system on memory. It's a file system version of a RAM Disk. As same as mirror file system, I checked that I can launch Firefox from MemoryFS. This is included in JDokan.zip. The license is MIT license.

5. JSFlickrFS

This might be the first file system written by JavaScript in history. I made Flickr can be read as a file system. I used Rhino. This is also included in JDokan.zip. The license is MIT license.

Launch mount.bat

Make 3 folders.

Three folders are created.

If you open T:\france, you can see thumbnails, which is downloaded from Flickr.