#bindings #driver #system-api #windows-file

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

#818 in Filesystem

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 Monkey C 55 SLoC 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