Add pack support for Qlie Pack Archive (.pack) v3.1

This commit is contained in:
2026-01-31 00:05:11 +08:00
parent fc6910df0a
commit 487d403d60
11 changed files with 937 additions and 14 deletions

View File

@@ -589,6 +589,12 @@ pub trait Script: std::fmt::Debug + std::any::Any {
/// A trait for creating archives.
pub trait Archive {
/// Returns an iterator of a list of filenames must writed before other files.
///
/// Should return None if no such requirement.
fn prelist<'a>(&'a self) -> Result<Option<Box<dyn Iterator<Item = Result<String>> + 'a>>> {
Ok(None)
}
/// Creates a new file in the archive.
///
/// size is optional, if provided, size must be exactly the size of the file to be created.