Crate winfsp

source ·
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

  • buildbuild
    Build-time helpers to be called from build.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.
  • notifynotify
    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

Functions

Type Aliases