pub trait ArchiveStorage {
// Required methods
fn read_file(&mut self, path: &str) -> Result<Vec<u8>>;
fn write_file(&mut self, path: &str, data: &[u8]) -> Result<()>;
fn file_exists(&self, path: &str) -> bool;
fn file_names(&self) -> Vec<String>;
}Expand description
Trait for archive storage backends.
This trait abstracts over the underlying storage mechanism (ZIP files, in-memory storage, etc.) to enable unit testing and support alternative backends.
Required Methods§
Sourcefn file_exists(&self, path: &str) -> bool
fn file_exists(&self, path: &str) -> bool
Check if a file exists in the archive.
Sourcefn file_names(&self) -> Vec<String>
fn file_names(&self) -> Vec<String>
Get all file names in the archive.