Archive.test

TestResult test() @safe

Tests (verifies) the archive integrity.

This method checks all files in the archive for data corruption and returns the number of files checked and any errors found.

Returns

A TestResult struct with filesChecked and errors counts.

Example:

auto arc = Archive.open("/backups", "myarchive", "dar", readOpts().toLow());
auto result = arc.test();
if (result.errors == 0)
    writeln("Archive is intact!");
else
    writefln("Found %d errors in %d files", result.errors, result.filesChecked);

Throws

DarException if testing fails (I/O errors, corruption, invalid handle).