Archive.create

Archive create(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safe

Creates a new archive writing slices to outDir.

Parameters

fsRootfilesystem root to back up
outDirdirectory where slices are written
basearchive base name
extslice extension (e.g., "dar")
cocreate options constructed via CreateOptions.create() or createOpts().toLow() Example:
import ddn.wrp.dar;
// Create archive with high-level options
auto co = createOpts()
             .withAllowOverwrite(true)
             .toLow();
auto arc = Archive.create("/home/user/docs", "/backups", "docs", "dar", co);
if (arc.isValid)
    writeln("Archive created successfully");

Throws

DarException if creation fails (permission denied, disk full,

invalid options, or other libdar-reported errors).