ArchiveHandle for the created archive.createArchiveWithStats
fn
ArchiveHandle createArchiveWithStats(string fsRoot, string outDir, string base, string ext,
CreateOptions co, out OperationStats stats) @safeCreates an archive with full operation statistics.
This is an enhanced version of createArchive that returns detailed statistics about the backup operation.
Parameters
fsRoot | filesystem root to back up |
outDir | directory where slices are written |
base | archive base name |
ext | slice extension (e.g., "dar") |
co | create options created via CreateOptions.create() |
stats | output parameter to receive operation statistics (optional, may be null) |
Returns
Throws
DarException if archive creation fails (I/O errors, invalid options,
insufficient permissions, or other libdar-reported errors).
Example:
auto co = CreateOptions.create();
OperationStats stats;
auto arc = createArchiveWithStats("/home/user", "/backups", "mybackup", "dar", co, stats);
writefln("Files treated: %d", stats.treated);
writefln("Bytes processed: %d", stats.byteAmount);