#winapi #bindings #driver


Rust-friendly wrapper for Dokan (user mode file system library for Windows)

5 unstable releases

1.3.1 Feb 16, 2020
0.3.1+dokan206 Dec 8, 2022
0.2.0+dokan150 May 29, 2021
0.1.2+dokan141 Jan 18, 2021
0.1.0+dokan131 Feb 19, 2020

#522 in Filesystem

Download history 3/week @ 2024-02-16 13/week @ 2024-02-23 39/week @ 2024-03-01 33/week @ 2024-03-08 7/week @ 2024-03-15 66/week @ 2024-03-22 99/week @ 2024-03-29 24/week @ 2024-04-05

190 downloads per month

MIT license

35K SLoC

C 17K SLoC // 0.1% comments C++ 5.5K SLoC // 0.1% comments Rust 4K SLoC // 0.0% comments Bitbake 3K SLoC Visual Studio Project 3K SLoC PowerShell 683 SLoC // 0.1% comments SWIG 621 SLoC Visual Studio Solution 292 SLoC JavaScript 222 SLoC // 0.0% comments C# 191 SLoC // 0.2% comments Python 11 SLoC Shell 8 SLoC Batch 5 SLoC



Dokan is a user mode file system for Windows. It allows anyone to safely and easily develop new file systems on Windows.

This crate is a Rust-friendly wrapper for Dokan, allowing you to create file systems using Rust. It builds upon the low-level dokan-sys crate.

In general, to create a file system with this library, you need to implement the FileSystemHandler trait, create a FileSystemMounter, and mount it to create a FileSystem. When dropped, the latter will block the current thread until it gets unmounted. You have to call init once before, and shutdown when you're done.

The same explanations with a few lines of code: see the MemFS example!

Please note that some of the constants from Win32 API that might be used when interacting with this crate are not provided directly here. However, you can easily find them in the winapi crate.