pub mod device; pub mod disc_image; use thiserror::Error; #[derive(Debug, Error)] pub enum VfsError { #[error("I/O error: {0}")] Io(#[from] std::io::Error), #[error("Invalid format: {0}")] InvalidFormat(String), #[error("File not found: {0}")] NotFound(String), } /// A virtual filesystem entry (file or directory). #[derive(Debug)] pub struct VfsEntry { pub name: String, pub is_directory: bool, pub size: u64, pub offset: u64, } /// Trait for VFS device implementations (XISO, STFS, host path, etc.) pub trait VfsDevice: Send + Sync { fn name(&self) -> &str; fn list_root(&self) -> Result, VfsError>; fn read_file(&self, path: &str) -> Result, VfsError>; fn stat(&self, path: &str) -> Result; }