pub fn list_archive<P: AsRef<Path>>(
archive_path: P,
config: &SecurityConfig,
) -> Result<ArchiveManifest>Expand description
Lists archive contents without extracting.
Returns a manifest containing metadata for all entries in the archive. No files are written to disk during this operation.
§Arguments
archive_path- Path to archive fileconfig- Security configuration (quota limits apply)
§Errors
Returns error if:
- Archive file cannot be opened
- Archive format is unsupported or corrupted
- Quota limits exceeded (file count, total size)
§Examples
use exarch_core::SecurityConfig;
use exarch_core::list_archive;
let config = SecurityConfig::default();
let manifest = list_archive("archive.tar.gz", &config)?;
println!("Archive contains {} files", manifest.total_entries);
for entry in manifest.entries {
println!("{}: {} bytes", entry.path.display(), entry.size);
}