vortex_fs/lib.rs
1//! `vortex-fs` — Virtual file system with deterministic fault injection.
2//!
3//! Provides a [`VortexFs`] trait that mirrors `std::fs` operations. Two
4//! implementations are included:
5//! - [`RealFs`] — production pass-through to `std::fs` (zero overhead).
6//! - [`SimFs`] — in-memory filesystem with configurable fault injection.
7//!
8//! # Example
9//! ```
10//! use vortex_fs::{SimFs, VortexFs};
11//!
12//! let mut fs = SimFs::new(42);
13//! fs.write_file("/data/hello.txt", b"world").unwrap();
14//! let data = fs.read_file("/data/hello.txt").unwrap();
15//! assert_eq!(data, b"world");
16//! ```
17
18mod real;
19mod sim;
20mod traits;
21
22pub use real::RealFs;
23pub use sim::SimFs;
24pub use traits::{FileMetadata, FileType, VortexFs, VortexFsError, VortexFsResult};