ddn.wrp.dar

High-level D wrapper for libdar — idiomatic archive operations.

Overview:

This module provides a high-level, idiomatic D interface for working

with DAR archives. It wraps the low-level bindings in ddn.lib.dar with RAII classes, ranges, and fluent option builders.

Use this module for most applications. The low-level module is available

for advanced use cases requiring direct control over the C shim.

Key_Components:

  • Archive — RAII class for archive operations (open, list, extract, test)
  • ReadOpts / CreateOpts — Fluent option builders with UFCS support
  • ListingRange / ChildrenRange — Forward ranges for archive listings
  • UserInteraction — Interface for custom user prompts

Quick_Start:

Creating a backup with fluent options:

import ddn.wrp.dar;

auto co = createOpts()
             .withCompression(DarCompression.GZIP)
             .withCompressionLevel(6)
             .withAllowOverwrite(true)
             .toLow();

auto arc = Archive.create("/home/user/docs", "/backups", "docs", "dar", co);

Opening and listing an archive:

import ddn.wrp.dar;
import std.algorithm : filter, map;
import std.array : array;

auto ro = readOpts().withExtension("dar").toLow();
auto arc = Archive.open("/backups", "docs", "dar", ro);

// Use range-based iteration
foreach (entry; arc.list())
    writefln("%s: %d bytes", entry.name, entry.size);

// Or with std.algorithm
auto txtFiles = arc.list()
                   .filter!(e => e.name.endsWith(".txt"))
                   .map!(e => e.name)
                   .array;

Extracting and testing:

auto arc = Archive.open("/backups", "docs", "dar", readOpts().toLow());

// Test integrity
auto result = arc.test();
if (result.errors == 0)
    writeln("Archive OK!");

// Extract to directory
arc.extract("/home/user/restored");

Error_Handling:

All operations throw DarException on failure. Use try-catch to handle errors:

try {
    auto arc = Archive.open("/path", "name", "dar", readOpts().toLow());
} catch (DarException e) {
    writefln("Error: %s", e.msg);
}

See Also

License

BSD-3-Clause

Types 22

class_WrpProgressCtx

Internal progress callback context stored per CreateOptions.

Fields
void delegate(const(char)[]) nothrow @nogc warn
void delegate(const(char)[]) nothrow @nogc treated

Compile-time and build-time feature flags for the linked libdar.

Properties are lazily initialized on first use and cached afterwards. Example usage:

import ddn.wrp.dar;
if (DarFeatures.hasZstd) writeln("Zstd compression available");

Fields
private bool _inited
private bool _hasLargefile
private bool _isThreadSafe
private bool _hasZ
private bool _hasBz2
private bool _hasXz
private bool _hasLz4
private bool _hasZstd
private bool _hasGcrypt
private bool _hasRsync
private bool _hasRemoteRepo
private bool _hasFtpRepo
private bool _hasSftpRepo
private bool _hasPosixFadvise
private uint _bits
private char _endian
private ulong _threadStackSize
private string _libthreadarVersion
Methods
private void ensureInit() @safe
bool hasLargefile() @property @safeTrue if largefile support is compiled in.
bool isThreadSafe() @property @safeTrue if libdar was compiled thread-safe.
bool hasZlib() @property @safeTrue if libz (gzip) compression is available.
bool hasBzip2() @property @safeTrue if bzip2 compression is available.
bool hasXz() @property @safeTrue if xz compression is available.
bool hasLz4() @property @safeTrue if lz4 compression is available.
bool hasZstd() @property @safeTrue if zstd compression is available.
bool hasEncryption() @property @safeTrue if libgcrypt encryption is available.
bool hasRsync() @property @safeTrue if librsync delta support is available.
bool hasRemoteRepository() @property @safeTrue if remote repository support is compiled in.
bool hasFtpRepository() @property @safeTrue if FTP repository support is compiled in.
bool hasSftpRepository() @property @safeTrue if SFTP repository support is compiled in.
bool hasPosixFadvise() @property @safeTrue if posix_fadvise() is used by libdar.
uint bits() @property @safeNumber of bits of the platform libdar was compiled for (e.g., 64).
char systemEndian() @property @safeSystem endian reported by libdar: 'L' for little, 'B' for big.
ulong threadStackSize() @property @safeSuggested thread stack size for libdar worker threads (0 = default).
string libthreadarVersion() @property @safelibthreadar library version string (empty if not available).

High-level interface for thread cancellation of libdar operations.

Thread cancellation allows external code to request the termination of a libdar operation running in a specific thread. The operation will abort at the next checkpoint, throwing an exception that properly cleans up resources. This does not terminate the thread itself, but causes the libdar call to return control to the caller.

Example:

import ddn.wrp.dar;
import core.thread;

// Get the thread ID before starting the operation
auto tid = ThreadCancellation.currentThreadId;

// In another thread, request cancellation:
// ThreadCancellation.cancel(tid);

// Check if cancellation is pending:
if (ThreadCancellation.isPending(tid))
    writeln("Cancellation requested");

// Clear a pending cancellation request:
ThreadCancellation.clear(tid);

Note

Thread cancellation requires pthread support in libdar. Use

ThreadCancellation.isAvailable to check if the feature is supported.

Methods
bool isAvailable() @property @safe @nogc nothrowReturns true if thread cancellation is available.
ulong currentThreadId() @property @safe @nogc nothrowReturns the current thread's ID for use with cancellation functions.
void cancel(ulong tid, bool immediate = true, ulong flag = 0) @safeRequest cancellation of a libdar operation in the specified thread.
bool isPending(ulong tid) @safeCheck if a thread has a pending cancellation request.
bool clear(ulong tid) @safeClear a pending cancellation request for a thread.
classArchive

High-level Archive wrapper.

This class provides an idiomatic D RAII wrapper over the low-level archive handle. It supports both creating new archives and opening existing ones for reading, with convenience methods for common operations.

Example:

import ddn.wrp.dar;

// Open an existing archive
auto arc = Archive.open("/backups", "myarchive", "dar", readOpts().toLow());

// List contents using range-based iteration
foreach (entry; arc.list())
    writefln("%s: %s", entry.type, entry.name);

// Get archive summary
auto summary = arc.summary;
writefln("Archive size: %d bytes", summary.archiveSize);

// Test archive integrity
auto result = arc.test();
writefln("Files checked: %d, Errors: %d", result.filesChecked, result.errors);

// Extract archive contents
arc.extract("/restore/path");

// Explicit cleanup (optional, destructor handles this automatically)
arc.close();

Fields
private ArchiveHandle _h
private bool _closed
private bool _summaryCached
private ArchiveSummary _summaryCache
Methods
Archive create(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safeCreates a new archive writing slices to `outDir`.
CreateStatsResult createWithStats(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safeCreates a new archive and returns operation statistics.
Archive createIncremental(string fsRoot, string outDir, string base, string ext, CreateOpts co, IncrOpts io) @safeCreates an incremental or differential backup archive.
Archive createIncremental(string fsRoot, string outDir, string base, string ext, CreateOptions co, IncrementalOptions io) @safeCreates an incremental or differential backup using low-level options.
Archive merge(Archive base, Archive other, string outDir, string mergedBase, string ext, MergeOpts mo) @safeMerges two archives into a new combined archive.
Archive merge(Archive base, Archive other, string outDir, string mergedBase, string ext, MergeOptions mo) @safeMerges two archives into a new combined archive using low-level options.
Archive merge(Archive base, Archive other, string outDir, string mergedBase, string ext) @safeMerges two archives into a new combined archive using default options.
Archive repair(string path, string base, string ext) @safeRepairs an archive catalogue and returns a new Archive instance.
DiffResult diff(Archive other) @safeCompares this archive with another archive.
Archive open(string path, string base, string ext, ReadOptions ro) @safeOpens an existing archive for reading.
Archive isolate(string outDir) @safeCreates an isolated catalog archive in the specified output directory.
bool isValid() @property const @safe @nogc nothrowWhether the underlying handle is valid and not closed.
ListingRange list() @safeReturns a forward range over the archive's root listing.
LazyListingRange listLazy() @safeReturns a lazy input range over the archive's root listing.
ChildrenRange listChildren(string path) @safeReturns a forward range over the children of the given directory path.
LazyChildrenRange listChildrenLazy(string path) @safeReturns a lazy input range over the direct children of the given path.
void extract(string destDir) @safe Extracts the archive contents to the specified directory. All files and directories from the archive are restored to `destDir`, preserving the original directory structure. Params: destDir ...
OperationStats extractWithStats(string destDir) @safeExtracts the archive contents to the specified directory, returning detailed `OperationStats` about the extraction operation.
OperationStats extractWithStats(string destDir, ExtractOptions eo) @safeExtracts the archive using custom `ExtractOptions`, returning detailed `OperationStats` about the extraction operation.
ArchiveSummary summary() @property @safeReturns summary metadata for the archive.
ArchiveSummary refreshSummary() @safeForces a refresh of the cached archive summary.
TestResult test() @safeTests (verifies) the archive integrity.
string[] sliceFiles() @safeLists full filesystem paths of all slice files composing this archive.
size_t sliceCount() @property @safeReturns the number of slice files composing this archive.
ulong[] sliceFileSizes() @safeReturns sizes (in bytes) of all slice files, ordered by slice index.
bool validateSlices() @safeValidates that the slice set on disk looks consistent.
TestStatsResult testWithStats() @safeTests (verifies) the archive integrity and returns operation statistics.
void close() @safe @nogc nothrowExplicitly closes the archive and releases resources.
Constructors
Nested Templates
CreateStatsResultResult of `createWithStats`, bundling the created `Archive` and the collected `OperationStats`.
TestStatsResultResult of `testWithStats`, bundling the `TestResult` and the collected `OperationStats`.

Transform provides a high-level, RAII wrapper for libdar data transforms (xform). It can read a source archive from a path/base/ext, a named pipe, or a file descriptor, and transform it to a directory (producing slices) or to a file descriptor.

Example:

import ddn.wrp.dar;

// From an existing archive on disk
auto tf = Transform.fromPath("/backups/src", "docs", "dar");
tf.toDir("/backups/xformed", "docs_xf", "dar");

Fields
private XformHandle _h
Methods
bool isValid() @property const @safe @nogc nothrowReturns true if the underlying handle is valid.
Transform fromPath(string path, string base, string ext, uint minDigits = 0, string execute = null) @safeCreates a Transform from a source archive located at `path/base.ext`.
Transform fromPipe(string pipeName) @safeCreates a Transform reading its source from a named pipe.
Transform fromFd(int fd) @safeCreates a Transform reading its source from a file descriptor.
void toDir(string outDir, string base, string ext, bool allowOverwrite = true, bool warnOverwrite = false, ulong firstSliceSize = 0, ulong sliceSize = 0, string slicePerm = null, string sliceUser = null, string sliceGroup = null, uint minDigits = 0, string execute = null) @safeTransforms the source to a directory, producing slices as needed.
void toFd(int fd, string execute = null) @safeTransforms the source to a file descriptor.
Constructors

Forward range over database entries (snapshot at construction).

This range collects database entries eagerly on construction via the low-level listDatabase() and then exposes standard range primitives.

Fields
private DbEntry[] _buf
private size_t _i
Methods
bool empty() @property const @safe @nogc nothrowTrue if no more entries are available.
const(DbEntry) front() @property ref const @safeThe current entry.
void popFront() @safe @nogc nothrowAdvance to next entry.
DatabaseRange save() @property @safe @nogc nothrowSave the current range state (forward range).
Constructors
this(DatabaseHandle db)Constructs a range by listing all entries in the database.

High-level Database wrapper providing RAII and idiomatic methods.

Use Database.create() to create an empty database, Database.load() to load from a dumped file, add() to register archives, removeRange() to delete by index, list() to iterate entries, and dump() to save to disk.

Fields
private DatabaseHandle _h
Methods
bool isValid() @property const @safe @nogc nothrowReturns true if the underlying handle is valid.
Database create() @safeCreates a new empty database.
Database load(string filename) @safeLoads a database from a dumped file.
void dump(string filename) @safeDumps the database to a file.
void add(string path, string base, string ext) @safeAdds an archive reference to the database using explicit coordinates.
void add(Archive arc) @safeAdds an archive reference to the database using an `Archive` instance.
void removeRange(uint minIndex, uint maxIndex) @safeRemoves entries by index range [minIndex, maxIndex] inclusive (0-based).
DatabaseRange list() @safeReturns a forward range over current database entries.
Constructors
structReadOpts

High-level, value-type read options with sensible defaults.

Use UFCS helpers to configure and toLow() to obtain a low-level ddn.lib.dar.ReadOptions suitable for FFI calls.

Fields
string extensionSlice extension (default: "dar").
uint minDigitsMinimum digits for slice numbering (0 disables padding).
string passwordOptional decryption password (empty means none). For security, prefer `withSecurePassword`.
SecurePassword * securePasswordOptional secure password reference. When provided (via `withSecurePassword`), it takes precedence over the plaintext `password` field.
string remoteUrlOptional remote URL (empty means local repository).
DarCryptoAlgo cryptoAlgoCrypto algorithm for decryption (default: NONE).
uint cryptoSizeCrypto key size in bits (0 = default).
bool sequentialReadSequential read mode: read archive sequentially (like tar) instead of using the final catalogue. Requires archive created with sequential marks enabled.

High-level, value-type create options with sensible defaults.

Use UFCS helpers to configure and toLow() to obtain a low-level ddn.lib.dar.CreateOptions suitable for FFI calls.

Fields
ulong sliceSizeSlice size in bytes (0 disables slicing).
ulong firstSliceSizeFirst slice size (0 means same as sliceSize).
bool allowOverwriteWhether to allow overwriting existing slices.
bool warnOverwriteWhether to warn on overwrite.
string slicePermSlice permission in octal string (e.g., "0644"). Empty = default.
string userCommentArchive user comment stored in metadata (empty = none).
string sliceUserSlice user ownership (username or UID string). Empty = default.
string sliceGroupSlice group ownership (group name or GID string). Empty = default.
string executeExecute hook command for slice completion. Empty = disabled.
string passwordOptional encryption password (empty means none).
SecurePassword * securePasswordOptional secure password reference. When provided (via `withSecurePassword`), it takes precedence over the plaintext `password` field.
string remoteUrlOptional remote URL (empty means local repository).
DarCompression compressionCompression algorithm (default: NONE).
uint compressionLevelCompression level (1-9, default: 9 for maximum compression).
uint compressionBlockSizeCompression block size (0 = streaming, >0 enables parallel compression).
DarCryptoAlgo cryptoAlgoCrypto algorithm for encryption (default: NONE).
uint cryptoSizeCrypto key size in bits (0 = default).
DarHashAlgo hashAlgoHash/checksum algorithm for sidecar file (default: NONE).
bool sequentialMarksSequential marks (tape marks): add escape sequences to allow sequential reading. Must be enabled at archive creation time for sequential read mode to work.
string backupHookExecuteBackup hook execute command. When set along with `backupHookFiles`, this command is executed before and after reading files matching the hook patterns.
string[] backupHookFilesFile patterns (glob-style) that trigger the backup hook command. Files matching ANY pattern in this list will trigger the hook execution. Examples: ".db", "/var/lib/mysql/", "*.sqlite"
void delegate(const(char)[] /*message*/ ) nothrow @nogc onProgressMessageOptional progress message callback. When set, receives human‑readable informational/warning messages produced during creation. The delegate must be `nothrow @nogc` and should return quickly.
void delegate(const(char)[] /*path*/ ) nothrow @nogc onProgressTreatedOptional progress treated callback. When set, receives the relative path of each file being processed. The delegate must be `nothrow @nogc` and should return quickly.
bool deltaSignatureEnable storing delta signatures for future incremental backups.
bool deltaDiffEnable computing binary delta using reference archive signatures.
ulong deltaSigMinSizeMinimum file size for delta signature computation (in bytes).

High-level, value-type filter options with sensible defaults.

Use UFCS helpers to configure and toLow() to obtain a low-level ddn.lib.dar.FilterOptions suitable for FFI calls.

Fields
string[] includesFilename include globs (e.g., "*.txt"). Empty = include all.
string[] excludesFilename exclude globs (take precedence over includes).
string[] includePathsPath include globs for subtree selection (e.g., "src", "docs").
string[] excludePathsPath exclude globs for subtree selection (e.g., "cache", "tmp").
string[] eaIncludesExtended Attribute (EA) include globs (e.g., "user.*"). EA names are in format "domain.name" (e.g., "user.comment", "system.posixaclaccess"). If empty, all EAs are included by default.
string[] eaExcludesExtended Attribute (EA) exclude globs (e.g., "system.*"). EA names matching any exclude pattern will be excluded during backup/restore. Exclude patterns take precedence over include patterns.
ulong minSizeMinimum file size in bytes (0 disables).
ulong maxSizeMaximum file size in bytes (0 disables).
bool caseSensitiveWhether pattern matching is case-sensitive (default: true).
structIncrOpts

High-level, value-type incremental backup options with sensible defaults.

Use UFCS helpers to configure and toLow() to obtain a low-level ddn.lib.dar.IncrementalOptions suitable for FFI calls.

Example:

// Create incremental backup referencing a base archive
auto io = incrOpts()
             .withReference("/backups", "full_backup", "dar")
             .withChangePolicy(DarChangePolicy.DATE)
             .withMode(DarIncrMode.INCREMENTAL);
auto arc = Archive.createIncremental("/data", "/backups", "incr1", "dar",
                                     createOpts().withAllowOverwrite(true), io);

Fields
string refPathPath to directory containing the reference archive.
string refBaseBase name of the reference archive.
string refExtExtension of the reference archive (default: "dar").
uint refMinDigitsMinimum digits for slice numbering in reference archive.
DarChangePolicy changePolicyChange detection policy (DATE or HASH).
string snapshotSnapshot file path for change tracking (empty disables).
DarIncrMode modeIncremental mode: INCREMENTAL, DIFFERENTIAL, or DECREMENTAL.
structMergeOpts

High-level, value-type merge options with sensible defaults.

Use UFCS helpers to configure and toLow() to obtain a low-level ddn.lib.dar.MergeOptions suitable for FFI calls.

Example:

// Merge two archives with compression
auto mo = mergeOpts()
             .withCompression(DarCompression.GZIP)
             .withCompressionLevel(6)
             .withSlicing(10 * 1024 * 1024);  // 10 MiB slices
auto merged = Archive.merge(baseArc, diffArc, "/backups", "merged", "dar", mo);

Fields
ulong sliceSizeSlice size in bytes (0 = no slicing).
ulong firstSliceSizeFirst slice size in bytes (0 = same as sliceSize).
DarCompression compressionCompression algorithm for merged archive.
uint compressionLevelCompression level (1-9, default: 9).
uint compressionBlockSizeCompression block size (0 = streaming).
int overwritePolicyOverwrite policy (0 = no overwrite, 1 = overwrite).
FilterOpts * filterOptional filter options for selective merging.

Input/forward range over archive root listing (snapshot at construction).

This range collects entries eagerly on construction and then provides standard range primitives: empty, front, popFront, and save.

Fields
private ListEntry[] _buf
private size_t _i
Methods
bool empty() @property const @safe @nogc nothrowTrue if no more entries are available.
const(ListEntry) front() @property ref const @safeThe current entry.
void popFront() @safe @nogc nothrowAdvance to next entry.
ListingRange save() @property @safe @nogc nothrowSave the current range state (forward range).
Constructors
this(ArchiveHandle h)Constructs a range by listing the archive root ("/").

Input range over archive root listing, produced lazily on demand.

Unlike ListingRange, this range does not eagerly collect entries. It does not pre-buffer all entries; instead, it scans the catalog to fetch only the current element when needed. This keeps memory usage bounded and proportional to the iteration progress.

Notes:

  • This is an InputRange only; copying is not supported (no save).
  • Iteration occurs on the same OS thread via cooperative scheduling.
Fields
private ArchiveHandle _h
private bool _done
private bool _hasSlot
private size_t _index
private ListEntry _slot
Methods
private void ensureFront() @safe
bool empty() @property @safeTrue if no more entries are available.
const(ListEntry) front() @property ref return @safeThe current entry (valid until next `popFront`).
void popFront() @safe @nogc nothrowAdvance to next entry.
Constructors
this(ArchiveHandle h)Constructs a lazy range over the archive root.

Input/forward range over the children of a given path in the archive (snapshot at construction).

This range collects entries eagerly on construction and then provides standard range primitives: empty, front, popFront, and save. It is compatible with std.algorithm and foreach idioms.

Fields
private ListEntry[] _buf
private size_t _i
Methods
bool empty() @property const @safe @nogc nothrowTrue if no more entries are available.
const(ListEntry) front() @property ref const @safeThe current entry.
void popFront() @safe @nogc nothrowAdvance to next entry.
ChildrenRange save() @property @safe @nogc nothrowSave the current range state (forward range).
Constructors
this(ArchiveHandle h, string path)Constructs a range by listing children of `path`.

Input range over the children of path, produced lazily on demand.

Yields entries one-by-one by scanning the children listing and fetching only the needed element at each step. This minimizes peak memory usage for large directories.

Notes:

  • InputRange only; copying is not supported (no save).
  • Cooperative scheduling on the same thread.
Fields
private ArchiveHandle _h
private string _path
private bool _done
private bool _hasSlot
private size_t _index
private ListEntry _slot
Methods
private void ensureFront() @safe
bool empty() @property @safe
const(ListEntry) front() @property ref return @safe
void popFront() @safe @nogc nothrow
Constructors
this(ArchiveHandle h, string path)Constructs a lazy range over children of `path`.

Interface describing user interaction operations used by libdar.

This abstraction mirrors the essential parts of libdar's user_interaction:

  • message to display information
  • pause to ask a yes/no question
  • getString to ask for arbitrary input (optionally without echo)
  • getSecuString like getString, reserved for sensitive input
Methods
void message(string msg) @safeDisplays a message to the user (no trailing newline required).
bool pause(string msg) @safePrompts the user with a yes/no question. Returns true for yes, false for no.
string getString(string msg, bool echo) @safePrompts the user for a string answer. If `echo` is false, input should ideally be hidden (best-effort in console).
string getSecuString(string msg, bool echo) @safeSame as `getString` but intended for sensitive input. For now this returns a regular `string`.

A basic console implementation of UserInteraction.

By default it targets stdin/stdout. For tests and embedding scenarios, you can inject custom read/write delegates.

Fields
private WriteFn _write
private ReadLineFn _readLine
Methods
BasicConsoleInteraction standard() @safeFactory that binds to stdin/stdout using std.stdio. Note: echo suppression for passwords is not implemented yet.
void message(string msg) @safe
bool pause(string msg) @safe
string getString(string msg, bool echo) @safe
string getSecuString(string msg, bool echo) @safe
Constructors
this(WriteFn w, ReadLineFn r)Constructs a console using provided writer/reader delegates.
private class_UserInteractionBridge

Internal context for bridging UserInteraction to C callbacks.

Constructors

BlindUserInteraction: A UserInteraction that silently ignores all prompts.

Useful for non-interactive batch processing. All messages are discarded, pause always returns false (no), and string prompts return empty strings.

Methods
void message(string msg) @safe
bool pause(string msg) @safe
string getString(string msg, bool echo) @safe
string getSecuString(string msg, bool echo) @safe
structSlaveOpts

High-level, value-type options for creating a dar_slave.

Use UFCS helpers to configure and pass to Slave.create().

Fields
string folderDirectory where the archive resides.
string basenameArchive base name.
string extensionArchive extension (default: "dar").
string inputPipeNamed pipe to receive orders (empty = stdin).
string outputPipeNamed pipe to send data (empty = stdout).
string executeCommand to execute before reading each slice (empty = disabled).
uint minDigitsMinimum digits for slice numbering (0 = not used).
classSlave

High-level wrapper for dar_slave functionality.

The dar_slave feature enables serving archive data through pipes for remote/network archive access. A slave process reads orders from an input pipe and sends archive data through an output pipe to a dar master process.

Use cases:

  • Network archive access (archive on remote machine, dar on local)
  • Tape/sequential media access
  • Privilege separation (archive reader with different permissions)

Example:

auto opts = slaveOpts()
              .withFolder("/archives")
              .withBasename("backup")
              .withInputPipe("orders_fifo")
              .withOutputPipe("data_fifo");
auto slave = Slave.create(opts);
slave.run();  // Blocks until master disconnects

Fields
private DarSlave _low
Methods
Slave create(SlaveOpts opts) @safeCreates a Slave instance from high-level options.
Slave createFromFds(SlaveOpts opts, int inputFd, int outputFd) @safeCreates a Slave instance from high-level options using file descriptors.
void run() @safeRuns the slave, serving archive data until the master disconnects.
bool isValid() @property const @safe @nogc nothrowReturns true if the slave handle is valid.
DarSlave lowLevel() @property @safe @nogc nothrowReturns the underlying low-level DarSlave (for advanced use).
Constructors

Functions 89

fnvoid _wrpWarnThunk(const char * msg, void * ctx) nothrow @nogcC thunks: convert C strings to ephemeral D slices and dispatch to delegates.
fnvoid _wrpTreatedThunk(const char * path, void * ctx) nothrow @nogc
private fnArchiveSummary _wrpFetchSummary(const ArchiveHandle h) @trustedInternal helper to fetch archive summary and, under tests, count fetches.
fnstring about() @safe @nogc pure nothrowReturns a short description string for the high-level module.
fnReadOpts readOpts() @safe @nogc pure nothrowReturns a default-initialized `ReadOpts`.
fnReadOptions toLow(ReadOpts ro) @safeReturns a low-level `ReadOptions` created from this `ReadOpts`. Throws: `DarException` if low-level option setters fail.
fnReadOpts withExtension(ReadOpts ro, string ext) @safe @nogc pure nothrowSets slice extension.
fnReadOpts withMinDigits(ReadOpts ro, uint n) @safe @nogc pure nothrowSets minimum digits for slice numbering.
fnReadOpts withPassword(ReadOpts ro, string pw) @safe @nogc pure nothrowSets decryption password.
fnReadOpts withSecurePassword(ReadOpts ro, ref SecurePassword pw) @system @nogc nothrowSets a secure password reference. This avoids copying plaintext into GC memory.
fnReadOpts withRemoteUrl(ReadOpts ro, string url) @safe @nogc pure nothrowSets remote URL.
fnReadOpts withCryptoAlgo(ReadOpts ro, DarCryptoAlgo algo) @safe @nogc pure nothrowSets crypto algorithm.
fnReadOpts withCryptoSize(ReadOpts ro, uint size) @safe @nogc pure nothrowSets crypto key size in bits.
fnReadOpts withSequentialRead(ReadOpts ro, bool val) @safe @nogc pure nothrowEnables or disables sequential read mode (read archive like tar without final catalogue).
fnCreateOpts createOpts() @safe @nogc pure nothrowReturns a default-initialized `CreateOpts`.
fnCreateOptions toLow(CreateOpts co) @safeReturns a low-level `CreateOptions` created from this `CreateOpts`. Throws: `DarException` if low-level option setters fail.
fnCreateOpts withSliceSize(CreateOpts co, ulong v) @safe @nogc pure nothrowSets slice size.
fnCreateOpts withFirstSliceSize(CreateOpts co, ulong v) @safe @nogc pure nothrowSets first slice size.
fnCreateOpts withAllowOverwrite(CreateOpts co, bool v) @safe @nogc pure nothrowSets allow overwrite flag.
fnCreateOpts withWarnOverwrite(CreateOpts co, bool v) @safe @nogc pure nothrowSets warn overwrite flag.
fnCreateOpts withSlicePerm(CreateOpts co, string v) @safe @nogc pure nothrowSets slice permission (octal string, e.g. "0644").
fnCreateOpts withUserComment(CreateOpts co, string v) @safe @nogc pure nothrowSets archive user comment stored in metadata.
fnCreateOpts withProgressCallback(CreateOpts co, void delegate(const(char)[]) nothrow @nogc onMessage, void delegate(const(char)[]) nothrow @nogc onTreated) @safe @nogc nothrowSets progress callbacks for archive creation.
fnCreateOpts withSliceUser(CreateOpts co, string v) @safe @nogc pure nothrowSets slice user ownership (username or UID string).
fnCreateOpts withSliceGroup(CreateOpts co, string v) @safe @nogc pure nothrowSets slice group ownership (group name or GID string).
fnCreateOpts withExecute(CreateOpts co, string v) @safe @nogc pure nothrowSets execute hook command for slice completion.
fnCreateOpts withPassword(CreateOpts co, string pw) @safe @nogc pure nothrowSets password.
fnCreateOpts withSecurePassword(CreateOpts co, ref SecurePassword pw) @system @nogc nothrowSets a secure password reference. This avoids copying plaintext into GC memory.
fnCreateOpts withRemoteUrl(CreateOpts co, string url) @safe @nogc pure nothrowSets remote URL.
fnCreateOpts withCompression(CreateOpts co, DarCompression algo) @safe @nogc pure nothrowSets compression algorithm.
fnCreateOpts withCompressionLevel(CreateOpts co, uint level) @safe @nogc pure nothrowSets compression level (1-9).
fnCreateOpts withCompressionBlockSize(CreateOpts co, uint size) @safe @nogc pure nothrowSets compression block size (0 = streaming).
fnCreateOpts withCryptoAlgo(CreateOpts co, DarCryptoAlgo algo) @safe @nogc pure nothrowSets crypto algorithm.
fnCreateOpts withCryptoSize(CreateOpts co, uint size) @safe @nogc pure nothrowSets crypto key size in bits.
fnCreateOpts withHashAlgo(CreateOpts co, DarHashAlgo algo) @safe @nogc pure nothrowSets hash/checksum algorithm for sidecar file generation.
fnCreateOpts withSequentialMarks(CreateOpts co, bool val) @safe @nogc pure nothrowEnables or disables sequential marks (tape marks) for sequential reading support.
fnCreateOpts withBackupHookExecute(CreateOpts co, string cmd) @safe @nogc pure nothrowSets the backup hook execute command.
fnCreateOpts withBackupHookFile(CreateOpts co, string pattern) @safe pure nothrowAdds a file pattern to the backup hook mask (glob-style, e.g., "*.db").
fnCreateOpts withDeltaSignature(CreateOpts co, bool val) @safe @nogc pure nothrowEnables or disables storing delta signatures for future incremental backups.
fnCreateOpts withDeltaDiff(CreateOpts co, bool val) @safe @nogc pure nothrowEnables or disables computing binary delta using reference archive signatures.
fnCreateOpts withDeltaSigMinSize(CreateOpts co, ulong size) @safe @nogc pure nothrowSets minimum file size for delta signature computation (in bytes).
fnFilterOpts filterOpts() @safe @nogc pure nothrowReturns a default-initialized `FilterOpts`.
fnFilterOptions toLow(FilterOpts fo) @safeReturns a low-level `FilterOptions` created from this `FilterOpts`. Throws: `DarException` if low-level option setters fail.
fnFilterOpts withInclude(FilterOpts fo, string pattern) @safe pure nothrowAdds a filename include pattern (glob).
fnFilterOpts withExclude(FilterOpts fo, string pattern) @safe pure nothrowAdds a filename exclude pattern (glob).
fnFilterOpts withIncludePath(FilterOpts fo, string pattern) @safe pure nothrowAdds a path include pattern (glob).
fnFilterOpts withExcludePath(FilterOpts fo, string pattern) @safe pure nothrowAdds a path exclude pattern (glob).
fnFilterOpts withEaInclude(FilterOpts fo, string pattern) @safe pure nothrowAdds an Extended Attribute (EA) include pattern (glob, e.g., "user.*").
fnFilterOpts withEaExclude(FilterOpts fo, string pattern) @safe pure nothrowAdds an Extended Attribute (EA) exclude pattern (glob, e.g., "system.*").
fnFilterOpts withMinSize(FilterOpts fo, ulong v) @safe pure nothrowSets minimum file size in bytes (0 disables).
fnFilterOpts withMaxSize(FilterOpts fo, ulong v) @safe pure nothrowSets maximum file size in bytes (0 disables).
fnFilterOpts withCaseSensitive(FilterOpts fo, bool v) @safe pure nothrowSets case sensitivity for pattern matching.
fnArchive createFiltered(string fsRoot, string outDir, string base, string ext, CreateOpts co, FilterOpts fo) @safeConvenience function: creates a filtered archive using high-level options.
fnMask globMask(string pattern, bool caseSensitive = true) @safeCreates a glob pattern mask using UFCS-friendly syntax.
fnMask regexMask(string pattern, bool caseSensitive = true) @safeCreates a POSIX regular expression mask using UFCS-friendly syntax.
fnMask boolMask(bool value) @safeCreates a boolean mask that always returns the same value.
fnMask exactPathMask(string path, bool caseSensitive = true) @safeCreates an exact path matching mask using UFCS-friendly syntax.
fnMask excludeDirMask(string path, bool caseSensitive = true) @safeCreates an exclude directory mask using UFCS-friendly syntax.
fnMask andMasks(Mask[] masks) @safeCombines multiple masks with AND logic (all must match).
fnMask orMasks(Mask[] masks) @safeCombines multiple masks with OR logic (any can match).
fnMask negateMask(Mask inner) @safeCreates a negation mask using UFCS-friendly syntax.
fnIncrOpts incrOpts() @safe @nogc pure nothrowReturns a default-initialized `IncrOpts`.
fnIncrementalOptions toLow(IncrOpts io) @safeReturns a low-level `IncrementalOptions` created from this `IncrOpts`.
fnIncrOpts withReference(IncrOpts io, string path, string base, string ext = "dar", uint minDigits = 0) @safe @nogc pure nothrowSets the reference archive coordinates.
fnIncrOpts withReference(IncrOpts io, Archive arc) @safeSets the reference archive from an existing Archive instance.
fnIncrOpts withChangePolicy(IncrOpts io, DarChangePolicy policy) @safe @nogc pure nothrowSets the change detection policy (DATE or HASH).
fnIncrOpts withSnapshot(IncrOpts io, string path) @safe @nogc pure nothrowSets the snapshot file path for change tracking.
fnIncrOpts withMode(IncrOpts io, DarIncrMode mode) @safe @nogc pure nothrowSets the incremental mode: INCREMENTAL, DIFFERENTIAL, or DECREMENTAL.
fnMergeOpts mergeOpts() @safe @nogc pure nothrowReturns a default-initialized `MergeOpts`.
fnMergeOptions toLow(MergeOpts mo) @safeReturns a low-level `MergeOptions` created from this `MergeOpts`.
fnMergeOpts withSlicing(MergeOpts mo, ulong sliceSize, ulong firstSliceSize = 0) @safe @nogc pure nothrowSets slice size in bytes (0 = no slicing).
fnMergeOpts withCompression(MergeOpts mo, DarCompression algo) @safe @nogc pure nothrowSets compression algorithm for merged archive.
fnMergeOpts withCompressionLevel(MergeOpts mo, uint level) @safe @nogc pure nothrowSets compression level (1-9).
fnMergeOpts withCompressionBlockSize(MergeOpts mo, uint size) @safe @nogc pure nothrowSets compression block size (0 = streaming).
fnMergeOpts withOverwritePolicy(MergeOpts mo, int policy) @safe @nogc pure nothrowSets overwrite policy (0 = no overwrite, 1 = overwrite).
fnMergeOpts withFilter(MergeOpts mo, FilterOpts * filter) @safe @nogc pure nothrowSets filter options for selective merging.
fnListingRange listRange(ArchiveHandle h) @safeConvenience function to create a root listing range.
fnLazyListingRange listLazyRange(ArchiveHandle h) @safeReturns a lazy input range over the archive root (streaming).
fnChildrenRange childrenRange(ArchiveHandle h, string path) @safeConvenience function to create a children listing range for `path`.
fnLazyChildrenRange childrenLazyRange(ArchiveHandle h, string path) @safeReturns a lazy input range over children of `path` (streaming).
fnUserInteractionHandle createUserInteractionHandle(UserInteraction ui) @trustedCreates a UserInteractionHandle from a D UserInteraction interface.
fnSlaveOpts slaveOpts() @safe @nogc pure nothrowReturns a default-initialized `SlaveOpts`.
fnSlaveOpts withFolder(SlaveOpts so, string v) @safe @nogc pure nothrowSets the archive folder.
fnSlaveOpts withBasename(SlaveOpts so, string v) @safe @nogc pure nothrowSets the archive basename.
fnSlaveOpts withExtension(SlaveOpts so, string v) @safe @nogc pure nothrowSets the archive extension.
fnSlaveOpts withInputPipe(SlaveOpts so, string v) @safe @nogc pure nothrowSets the input pipe name (empty = stdin).
fnSlaveOpts withOutputPipe(SlaveOpts so, string v) @safe @nogc pure nothrowSets the output pipe name (empty = stdout).
fnSlaveOpts withExecute(SlaveOpts so, string v) @safe @nogc pure nothrowSets the execute command for slice changes.
fnSlaveOpts withMinDigits(SlaveOpts so, uint v) @safe @nogc pure nothrowSets the minimum digits for slice numbering.

Variables 2

var_WrpProgressCtx[CreateOptions] _wrpProgressKeepAlive

Keep contexts alive while low-level CreateOptions are in use.

private var_UserInteractionBridge[UserInteractionHandle] _uiBridgeKeepAlive

Keep bridge contexts alive while their UserInteractionHandle is in use.