Skip to main content

Module win_map

Module win_map 

Source
Expand description

Pure mapping helpers from the platform-agnostic ForensicFs model onto Windows filesystem semantics (path components, file attributes, timestamps).

This module is cross-platform on purpose: the Windows mount backend (fuse_windows, #[cfg(windows)]) is a thin Humble-Object shell over Dokan’s FFI callbacks, so every testable decision lives here where the Linux/macOS cargo test job can exercise it. The attribute constants are the documented Windows ABI values ([MS-FSCC] §2.6 / WinNT.h), so they are defined once here and reused by the shell rather than pulled from a Windows-only binding crate.

Constants§

FILE_ATTRIBUTE_DIRECTORY
FILE_ATTRIBUTE_DIRECTORY — the handle identifies a directory.
FILE_ATTRIBUTE_NORMAL
FILE_ATTRIBUTE_NORMAL — no other attributes are set (valid only alone).
FILE_ATTRIBUTE_READONLY
FILE_ATTRIBUTE_READONLY — the file is read-only.

Functions§

path_components
Split a Windows path (\dir\file, also tolerating /) into its non-empty components, for walking ForensicFs::lookup from the root.
to_system_time
Convert a Unix FsTimestamp to a SystemTime (Dokan converts it to a Windows FILETIME internally).
windows_attributes
Windows file-attribute bits for a ForensicFs file type.