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 from
build.rs
. - constants
- Useful constants re-exported from
winfsp-sys
. - filesystem
- The main filesystem interfaces and helpers used to implement a WinFSP filesystem.
- host
- Interfaces and configuration relating to the filesystem runtime host that manages the lifetime of the filesystem context.
- notify
notify
- Helpers to implement filesystem notifications.
- service
- Interfaces to the WinFSP service API to run a filesystem.
- util
- Helpful utility wrappers around OS constructs.
Structs§
- FspInit
- WinFSP initialization token.
- U16CStr
- C-style 16-bit wide string slice for
U16CString
. - U16C
String - An owned, mutable C-style 16-bit wide string for FFI that is nul-aware and nul-terminated.
Enums§
- FspError
- Error type for WinFSP.
Functions§
- winfsp_
init - Initialize WinFSP.
- winfsp_
init_ or_ die - Initialize WinFSP, shutting down the executing process on failure.
Type Aliases§
- Result
- Result type for WinFSP.