#bindings #driver

dokan

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

#456 in Filesystem

Download history 1/week @ 2024-02-14 12/week @ 2024-02-21 32/week @ 2024-02-28 40/week @ 2024-03-06 8/week @ 2024-03-13 39/week @ 2024-03-20 86/week @ 2024-03-27

185 downloads per month

MIT license

2MB
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

../README.md


lib.rs:

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.

Dependencies