Skip to content

Latest commit

 

History

History
141 lines (104 loc) · 7.23 KB

README.md

File metadata and controls

141 lines (104 loc) · 7.23 KB

Dokany

Github All Releases Build status Quality Gate Status Codacy Badge CII Best Practices FOSSA Status Average time to resolve an issue Percentage of issues still open

Dokan Demo

What is Dokan

When you want to create a new file system on Windows, other than FAT or NTFS, you need to develop a file system driver. Developing a device driver that works in kernel mode on windows is extremely technical. By using Dokan, you can create your own file systems very easily without writing device drivers. Dokan is similar to FUSE (Linux file system in user space) but works on Windows. Moreover, dokany includes a FUSE wrapper that helps you to port your FUSE filesystems without changes.

What is Dokany

Dokany is a fork of Dokan 0.6.0 with bug fixes, clean change history and updated to build with latest tools.

Because the original Dokan Legacy (< 0.6.0) project is no longer maintained.

Since version 0.8.0, dokany broke compatibility with the dokan API. See Choose a version for more information.

The API has then again changed over time in 1.1.0 and 2.0.0.

Benchmark v1.5.1.1000 vs v2.0.3.1000

A benchmark that is testing multiple scenarios repeaditly and sequentially was run 5 times against the memfs sample of v1.5.1.1000 and v2.0.3.1000 in an idle environment to precise results. The detail results can be seen in this spreadsheet here. As better threading and memory poll were added in v2, it is expected that concurrent scenarios (like those tests) would be even more highly improved.

A sample of the results:

Create New      |  +13.55% | List          |  +60.69% | GetAttributes |  +48.78% | Read  | +18-42% |
Open/Overwrite  | +153.41% | ListExactFile | +131.91% | SetAttributes | +120.91% | Write | +10-32% |
RandomOpenClose | +173.05% |               |          | Delete        |  +90.83% |       |         |

Licensing

Dokan contains LGPL and MIT licensed programs.

  • user-mode library (dokan2.dll) LGPL
  • driver (dokan2.sys) LGPL
  • network library (dokannp2.dll) LGPL
  • fuse library (dokanfuse2.dll) LGPL
  • installer (DokanSetup.exe) LGPL
  • control program (dokanctl.exe) MIT
  • samples (mirror.exe / memfs.exe) MIT

For details, please check the license files.

  • LGPL license.lgpl.txt
  • MIT license.mit.txt

You can obtain source files from https://dokan-dev.github.io

Environment

Dokan works on

  • Windows Server 2022 / 2019 / 2016 / 2012 (R2) / 2008 R2 SP1
  • Windows 11 / 10 / 8.1 / 8 / 7 SP1

Platform

  • x86
  • x64
  • ARM
  • ARM64

Signed Release and Debug drivers are provided at each release for all platforms.

How it works

Dokan library contains a user mode DLL (dokan2.dll) and a kernel mode file system driver (dokan2.sys). Once the Dokan file system driver is installed, you can create file systems which can be seen as normal file systems in Windows. The application that creates file systems using Dokan library is called File system application.

File operation requests from user programs (e.g., CreateFile, ReadFile, WriteFile, ...) will be sent to the Windows I/O subsystem (runs in kernel mode) which will subsequently forward the requests to the Dokan file system driver (dokan2.sys). By using functions provided by the Dokan user mode library (dokan2.dll), file system applications are able to register callback functions to the file system driver. The file system driver will invoke these callback routines in order to respond to the requests it received. The results of the callback routines will be sent back to the user program.

For example, when Windows Explorer requests to open a directory, the CreateFile with Direction option request will be sent to Dokan file system driver and the driver will invoke the CreateFile callback provided by the file system application. The results of this routine are sent back to Windows Explorer as the response to the CreateFile request. Therefore, the Dokan file system driver acts as a proxy between user programs and file system applications. The advantage of this approach is that it allows programmers to develop file systems in user mode which is safe and easy to debug.

To learn more about Dokan file system development, see the API documentation and the samples, especially dokan_memfs.

Build

In short, download and install the Visual Studio 2019, select Windows 10 SDK component during the install or from the Tools menu & install the WDK 10

For details, see the build page.

Installation

The latest official and signed build can be downloaded from:

For manual installation, see the installation page.

Contribute

You want Dokan to get better? Contribute!

Learn the code and suggest your changes on GitHub repository.

Detect defects and report them on GitHub issue tracker.

Ask and answer questions on Github Discussions or Google discussion group.