- ddn.lib.dar — Low-level bindings
- DAR Homepage
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 supportListingRange/ChildrenRange— Forward ranges for archive listingsUserInteraction— 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
Copyright
Types 22
Internal progress callback context stored per CreateOptions.
void delegate(const(char)[]) nothrow @nogc warnvoid delegate(const(char)[]) nothrow @nogc treatedCompile-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");private bool _initedprivate bool _hasLargefileprivate bool _isThreadSafeprivate bool _hasZprivate bool _hasBz2private bool _hasXzprivate bool _hasLz4private bool _hasZstdprivate bool _hasGcryptprivate bool _hasRsyncprivate bool _hasRemoteRepoprivate bool _hasFtpRepoprivate bool _hasSftpRepoprivate bool _hasPosixFadviseprivate uint _bitsprivate char _endianprivate ulong _threadStackSizeprivate string _libthreadarVersionulong 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
ThreadCancellation.isAvailable to check if the feature is supported.
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.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();private ArchiveHandle _hprivate bool _closedprivate bool _summaryCachedprivate ArchiveSummary _summaryCacheArchive 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.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.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.TestStatsResult testWithStats() @safeTests (verifies) the archive integrity and returns operation statistics.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");private XformHandle _hTransform 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`.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.this(XformHandle h)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.
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.
private DatabaseHandle _hvoid add(string path, string base, string ext) @safeAdds an archive reference to the database using explicit coordinates.void removeRange(uint minIndex, uint maxIndex) @safeRemoves entries by index range [minIndex, maxIndex] inclusive (0-based).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.
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.
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.
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).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);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.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);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.
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.
private ArchiveHandle _hprivate bool _doneprivate bool _hasSlotprivate size_t _indexprivate ListEntry _slotthis(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.
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.
private ArchiveHandle _hprivate string _pathprivate bool _doneprivate bool _hasSlotprivate size_t _indexprivate ListEntry _slotthis(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:
messageto display informationpauseto ask a yes/no questiongetStringto ask for arbitrary input (optionally without echo)getSecuStringlikegetString, reserved for sensitive input
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.
private WriteFn _writeprivate ReadLineFn _readLineBasicConsoleInteraction standard() @safeFactory that binds to stdin/stdout using std.stdio. Note: echo suppression for passwords is not implemented yet.void message(string msg) @safebool pause(string msg) @safestring getString(string msg, bool echo) @safestring getSecuString(string msg, bool echo) @safethis(WriteFn w, ReadLineFn r)Constructs a console using provided writer/reader delegates.Internal context for bridging UserInteraction to C callbacks.
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.
void message(string msg) @safebool pause(string msg) @safestring getString(string msg, bool echo) @safestring getSecuString(string msg, bool echo) @safeHigh-level, value-type options for creating a dar_slave.
Use UFCS helpers to configure and pass to Slave.create().
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).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 disconnectsprivate DarSlave _lowSlave createFromFds(SlaveOpts opts, int inputFd, int outputFd) @safeCreates a Slave instance from high-level options using file descriptors.Functions 89
void _wrpWarnThunk(const char * msg, void * ctx) nothrow @nogcC thunks: convert C strings to ephemeral D slices and dispatch to delegates.ArchiveSummary _wrpFetchSummary(const ArchiveHandle h) @trustedInternal helper to fetch archive summary and, under tests, count fetches.string about() @safe @nogc pure nothrowReturns a short description string for the high-level module.ReadOptions toLow(ReadOpts ro) @safeReturns a low-level `ReadOptions` created from this `ReadOpts`. Throws: `DarException` if low-level option setters fail.ReadOpts withMinDigits(ReadOpts ro, uint n) @safe @nogc pure nothrowSets minimum digits for slice numbering.ReadOpts withSecurePassword(ReadOpts ro, ref SecurePassword pw) @system @nogc nothrowSets a secure password reference. This avoids copying plaintext into GC memory.ReadOpts withCryptoAlgo(ReadOpts ro, DarCryptoAlgo algo) @safe @nogc pure nothrowSets crypto algorithm.ReadOpts withCryptoSize(ReadOpts ro, uint size) @safe @nogc pure nothrowSets crypto key size in bits.ReadOpts withSequentialRead(ReadOpts ro, bool val) @safe @nogc pure nothrowEnables or disables sequential read mode (read archive like tar without final catalogue).CreateOptions toLow(CreateOpts co) @safeReturns a low-level `CreateOptions` created from this `CreateOpts`. Throws: `DarException` if low-level option setters fail.CreateOpts withFirstSliceSize(CreateOpts co, ulong v) @safe @nogc pure nothrowSets first slice size.CreateOpts withAllowOverwrite(CreateOpts co, bool v) @safe @nogc pure nothrowSets allow overwrite flag.CreateOpts withWarnOverwrite(CreateOpts co, bool v) @safe @nogc pure nothrowSets warn overwrite flag.CreateOpts withSlicePerm(CreateOpts co, string v) @safe @nogc pure nothrowSets slice permission (octal string, e.g. "0644").CreateOpts withUserComment(CreateOpts co, string v) @safe @nogc pure nothrowSets archive user comment stored in metadata.CreateOpts 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.CreateOpts withSliceUser(CreateOpts co, string v) @safe @nogc pure nothrowSets slice user ownership (username or UID string).CreateOpts withSliceGroup(CreateOpts co, string v) @safe @nogc pure nothrowSets slice group ownership (group name or GID string).CreateOpts withExecute(CreateOpts co, string v) @safe @nogc pure nothrowSets execute hook command for slice completion.CreateOpts withSecurePassword(CreateOpts co, ref SecurePassword pw) @system @nogc nothrowSets a secure password reference. This avoids copying plaintext into GC memory.CreateOpts withCompression(CreateOpts co, DarCompression algo) @safe @nogc pure nothrowSets compression algorithm.CreateOpts withCompressionLevel(CreateOpts co, uint level) @safe @nogc pure nothrowSets compression level (1-9).CreateOpts withCompressionBlockSize(CreateOpts co, uint size) @safe @nogc pure nothrowSets compression block size (0 = streaming).CreateOpts withCryptoAlgo(CreateOpts co, DarCryptoAlgo algo) @safe @nogc pure nothrowSets crypto algorithm.CreateOpts withCryptoSize(CreateOpts co, uint size) @safe @nogc pure nothrowSets crypto key size in bits.CreateOpts withHashAlgo(CreateOpts co, DarHashAlgo algo) @safe @nogc pure nothrowSets hash/checksum algorithm for sidecar file generation.CreateOpts withSequentialMarks(CreateOpts co, bool val) @safe @nogc pure nothrowEnables or disables sequential marks (tape marks) for sequential reading support.CreateOpts withBackupHookExecute(CreateOpts co, string cmd) @safe @nogc pure nothrowSets the backup hook execute command.CreateOpts withBackupHookFile(CreateOpts co, string pattern) @safe pure nothrowAdds a file pattern to the backup hook mask (glob-style, e.g., "*.db").CreateOpts withDeltaSignature(CreateOpts co, bool val) @safe @nogc pure nothrowEnables or disables storing delta signatures for future incremental backups.CreateOpts withDeltaDiff(CreateOpts co, bool val) @safe @nogc pure nothrowEnables or disables computing binary delta using reference archive signatures.CreateOpts withDeltaSigMinSize(CreateOpts co, ulong size) @safe @nogc pure nothrowSets minimum file size for delta signature computation (in bytes).FilterOptions toLow(FilterOpts fo) @safeReturns a low-level `FilterOptions` created from this `FilterOpts`. Throws: `DarException` if low-level option setters fail.FilterOpts withInclude(FilterOpts fo, string pattern) @safe pure nothrowAdds a filename include pattern (glob).FilterOpts withExclude(FilterOpts fo, string pattern) @safe pure nothrowAdds a filename exclude pattern (glob).FilterOpts withIncludePath(FilterOpts fo, string pattern) @safe pure nothrowAdds a path include pattern (glob).FilterOpts withExcludePath(FilterOpts fo, string pattern) @safe pure nothrowAdds a path exclude pattern (glob).FilterOpts withEaInclude(FilterOpts fo, string pattern) @safe pure nothrowAdds an Extended Attribute (EA) include pattern (glob, e.g., "user.*").FilterOpts withEaExclude(FilterOpts fo, string pattern) @safe pure nothrowAdds an Extended Attribute (EA) exclude pattern (glob, e.g., "system.*").FilterOpts withMinSize(FilterOpts fo, ulong v) @safe pure nothrowSets minimum file size in bytes (0 disables).FilterOpts withMaxSize(FilterOpts fo, ulong v) @safe pure nothrowSets maximum file size in bytes (0 disables).FilterOpts withCaseSensitive(FilterOpts fo, bool v) @safe pure nothrowSets case sensitivity for pattern matching.Archive createFiltered(string fsRoot, string outDir, string base, string ext,
CreateOpts co, FilterOpts fo) @safeConvenience function: creates a filtered archive using high-level options.Mask globMask(string pattern, bool caseSensitive = true) @safeCreates a glob pattern mask using UFCS-friendly syntax.Mask regexMask(string pattern, bool caseSensitive = true) @safeCreates a POSIX regular expression mask using UFCS-friendly syntax.Mask exactPathMask(string path, bool caseSensitive = true) @safeCreates an exact path matching mask using UFCS-friendly syntax.Mask excludeDirMask(string path, bool caseSensitive = true) @safeCreates an exclude directory mask using UFCS-friendly syntax.IncrementalOptions toLow(IncrOpts io) @safeReturns a low-level `IncrementalOptions` created from this `IncrOpts`.IncrOpts withReference(IncrOpts io, string path, string base, string ext = "dar", uint minDigits = 0) @safe @nogc pure nothrowSets the reference archive coordinates.IncrOpts withReference(IncrOpts io, Archive arc) @safeSets the reference archive from an existing Archive instance.IncrOpts withChangePolicy(IncrOpts io, DarChangePolicy policy) @safe @nogc pure nothrowSets the change detection policy (DATE or HASH).IncrOpts withSnapshot(IncrOpts io, string path) @safe @nogc pure nothrowSets the snapshot file path for change tracking.IncrOpts withMode(IncrOpts io, DarIncrMode mode) @safe @nogc pure nothrowSets the incremental mode: INCREMENTAL, DIFFERENTIAL, or DECREMENTAL.MergeOptions toLow(MergeOpts mo) @safeReturns a low-level `MergeOptions` created from this `MergeOpts`.MergeOpts withSlicing(MergeOpts mo, ulong sliceSize, ulong firstSliceSize = 0) @safe @nogc pure nothrowSets slice size in bytes (0 = no slicing).MergeOpts withCompression(MergeOpts mo, DarCompression algo) @safe @nogc pure nothrowSets compression algorithm for merged archive.MergeOpts withCompressionLevel(MergeOpts mo, uint level) @safe @nogc pure nothrowSets compression level (1-9).MergeOpts withCompressionBlockSize(MergeOpts mo, uint size) @safe @nogc pure nothrowSets compression block size (0 = streaming).MergeOpts withOverwritePolicy(MergeOpts mo, int policy) @safe @nogc pure nothrowSets overwrite policy (0 = no overwrite, 1 = overwrite).MergeOpts withFilter(MergeOpts mo, FilterOpts * filter) @safe @nogc pure nothrowSets filter options for selective merging.LazyListingRange listLazyRange(ArchiveHandle h) @safeReturns a lazy input range over the archive root (streaming).ChildrenRange childrenRange(ArchiveHandle h, string path) @safeConvenience function to create a children listing range for `path`.LazyChildrenRange childrenLazyRange(ArchiveHandle h, string path) @safeReturns a lazy input range over children of `path` (streaming).UserInteractionHandle createUserInteractionHandle(UserInteraction ui) @trustedCreates a UserInteractionHandle from a D UserInteraction interface.SlaveOpts withExtension(SlaveOpts so, string v) @safe @nogc pure nothrowSets the archive extension.SlaveOpts withInputPipe(SlaveOpts so, string v) @safe @nogc pure nothrowSets the input pipe name (empty = stdin).SlaveOpts withOutputPipe(SlaveOpts so, string v) @safe @nogc pure nothrowSets the output pipe name (empty = stdout).SlaveOpts withExecute(SlaveOpts so, string v) @safe @nogc pure nothrowSets the execute command for slice changes.SlaveOpts withMinDigits(SlaveOpts so, uint v) @safe @nogc pure nothrowSets the minimum digits for slice numbering.Variables 2
_WrpProgressCtx[CreateOptions] _wrpProgressKeepAliveKeep contexts alive while low-level CreateOptions are in use.
Keep bridge contexts alive while their UserInteractionHandle is in use.