ArchiveHandle for the opened archive.openArchiveRead
Opens an archive for reading using minimal parameters.
This function opens an existing DAR archive and returns a handle that can be used for listing, extraction, and other read operations.
Parameters
path | directory containing slices |
base | basename of the archive (without slice number and extension) |
ext | slice extension (usually "dar") |
ro | optional read options created with ReadOptions.create(); pass null to use defaults |
Returns
An
Throws
DarException if the archive cannot be opened (file not found, permission denied,
corrupted archive, wrong password for encrypted archives).
Example:
// Open an unencrypted archive
auto archive = openArchiveRead("/backups", "myarchive", "dar");
// Open with custom options (e.g., for encrypted archives)
auto ro = ReadOptions.create();
ro.setExtension("dar");
ro.setPassword("secret");
auto encryptedArchive = openArchiveRead("/backups", "secure", "dar", ro);