Expose bounded directory bundle entries

This commit is contained in:
Dylan M. Taylor committed 2026-11-13 02:23:08 -05:00
1 parent b0284aad09
commit de087a4524
1 file changed
+5
+5
View File
@@ -391,6 +391,11 @@ impl DirectoryBundle {
self.read(craft_pcraft_format::MANIFEST, self.limits.max_manifest_bytes)
}
/// Reads any canonical bundle entry.
pub fn entry(&self, path: &str, max_bytes: u64) -> Result<Option<Vec<u8>>> {
self.read_optional(path, max_bytes)
}
/// Reads an optional preview entry.
pub fn preview(&self, path: &str) -> Result<Option<Vec<u8>>> {
if !matches!(path, craft_pcraft_format::THUMB | craft_pcraft_format::COMPOSITE | craft_pcraft_format::FULL_COMPOSITE) {