testArchiveWithStats

fnTestResult testArchiveWithStats(const ArchiveHandle h, out OperationStats stats) @safe

Tests archive integrity with full operation statistics.

This is an enhanced version of testArchive that returns both the basic test result and detailed operation statistics.

Parameters

harchive handle
statsoutput parameter to receive operation statistics

Returns

TestResult with files checked and error count.

Throws

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

Example:

auto ro = ReadOptions.create();
auto h = openArchiveRead("/backups", "mybackup", "dar", ro);
OperationStats stats;
auto result = testArchiveWithStats(h, stats);
writefln("Files checked: %d", result.filesChecked);
writefln("Errors: %d", result.errors);
writefln("Bytes verified: %d", stats.byteAmount);