dw_vfs_lib
dw_vfs_lib is a reimplementation of OpenMW's virtual file system, or VFS. It provides tools for working with directory structures, archive files, and file metadata, making it ideal for applications that need to handle complex file hierarchies - including complex mod loadouts handled by mod managers. dw_vfs_lib does not inherently depend on OpenMW or any particular game or technology - it can be repurposed easily for almost any use case.
Features
-
Virtual File System (VFS):
- Manage files and directories in a virtualized structure.
- Normalize paths for consistent access.
- Query files by name, prefix, or other criteria.
-
Parallel Processing:
- Leverages the
rayoncrate for efficient parallel operations on large file sets.
- Leverages the
-
Serialization (Optional):
- Serialize the VFS structure to JSON, YAML, or TOML formats using
serde.
- Serialize the VFS structure to JSON, YAML, or TOML formats using
-
Archive Support:
- Integrates with the
ba2crate to handle Bethesda archive formats (e.g., BSA, BA2).
- Integrates with the
Installation
Add dw_vfs_lib to your Cargo.toml:
[]
= "0.1.0"
To enable optional serialization features:
[]
= { = "0.1.0", = ["serde"] }
Usage
Basic Example
use VFS;
use PathBuf;
Serialization (Optional)
Enable the serialize feature to serialize the VFS structure to your preferred text format:
use ;
Feature Flags
default: No optional features enabled.serialize: Enables serialization to JSON, YAML, and TOML.
License
This project is licensed under the MIT License. See the LICENSE file for details.