mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-07 13:28:47 +08:00
Add support to pack xp3 files
This commit is contained in:
@@ -586,6 +586,11 @@ pub trait Script: std::fmt::Debug + std::any::Any {
|
||||
pub trait Archive {
|
||||
/// Creates a new file in the archive.
|
||||
fn new_file<'a>(&'a mut self, name: &str) -> Result<Box<dyn WriteSeek + 'a>>;
|
||||
/// Creates a new file in the archive that does not require seeking.
|
||||
fn new_file_non_seek<'a>(&'a mut self, name: &str) -> Result<Box<dyn Write + 'a>> {
|
||||
self.new_file(name)
|
||||
.map(|f| Box::new(f) as Box<dyn Write + 'a>)
|
||||
}
|
||||
/// Writes the header of the archive. (Must be called after writing all files.)
|
||||
fn write_header(&mut self) -> Result<()>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user