Expand description
Safe Rust bindings to WinFSP.
Usage
The winfsp
crate wraps the WinFSP service architecture and user mode filesystem host.
Implement the FileSystemContext
trait, then
create a FileSystemHost
instance.
It is highly recommended to use the service architecture to manage the lifecycle of a FileSystemHost
.
Using FileSystemServiceBuilder
, create, start, and mount the FileSystemHost
within the FileSystemServiceBuilder::with_start
closure,
and handle teardown in the FileSystemServiceBuilder::with_stop
closure.
The resulting service can be built after initializing WinFSP for your application with winfsp_init
or winfsp_init_or_die
.
Build-time requirements
WinFSP only supports delayloading of its library. You must emit the required
compile flags in build.rs
with winfsp_link_delayload
.
fn main() {
winfsp::build::winfsp_link_delayload();
}
Modules
- build
build
Build-time helpers to be called frombuild.rs
. - Useful constants re-exported from
winfsp-sys
. - The main filesystem interfaces and helpers used to implement a WinFSP filesystem.
- Interfaces and configuration relating to the filesystem runtime host that manages the lifetime of the filesystem context.
- notify
notify
Helpers to implement filesystem notifications. - Interfaces to the WinFSP service API to run a filesystem.
- Helpful utility wrappers around OS constructs.
Structs
- WinFSP initialization token.
- C-style 16-bit wide string slice for
U16CString
. - An owned, mutable C-style 16-bit wide string for FFI that is nul-aware and nul-terminated.
Enums
- Error type for WinFSP.
Functions
- Initialize WinFSP.
- Initialize WinFSP, shutting down the executing process on failure.
Type Aliases
- Result type for WinFSP.