createArchiveWithStats

fnArchiveHandle createArchiveWithStats(string fsRoot, string outDir, string base, string ext, CreateOptions co, out OperationStats stats) @safe

Creates an archive with full operation statistics.

This is an enhanced version of createArchive that returns detailed statistics about the backup operation.

Parameters

fsRootfilesystem root to back up
outDirdirectory where slices are written
basearchive base name
extslice extension (e.g., "dar")
cocreate options created via CreateOptions.create()
statsoutput parameter to receive operation statistics (optional, may be null)

Returns

ArchiveHandle for the created archive.

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);