- ddn.wrp.dar — High-level wrapper API
- DAR Homepage
ddn.lib.dar
Low-level D bindings for libdar — the Disk ARchive library.
Overview:
This module provides comprehensive D bindings to libdar, a powerful
library for creating, reading, and manipulating DAR archives. DAR is a disk archiving tool that supports features like compression, encryption, slicing, and incremental backups.
The bindings are implemented via a C++ shim layer that translates
between D and libdar's C++ API, providing memory-safe access to archive operations.
Main Features:
- Archive creation with optional compression (gzip, bzip2, xz, zstd, lz4)
- Archive reading and content listing
- File extraction with directory structure preservation
- Encryption support (AES-256, Blowfish, Twofish, Serpent, Camellia)
- Incremental and differential backups
- Archive slicing for spanning multiple media
- File filtering with include/exclude patterns
- Archive integrity testing and repair
- Progress callbacks during long operations
Quick_Start:
Creating a simple backup:
import ddn.lib.dar;
// Create options with compression
auto co = CreateOptions.create();
co.setCompression(DarCompression.GZIP);
co.setCompressionLevel(6);
// Create archive
auto archive = createArchive("/home/user/documents", "/backups", "docs_backup", "dar", co);
assert(archive.isValid);Reading and listing an archive:
import ddn.lib.dar;
auto ro = ReadOptions.create();
ro.setExtension("dar");
auto archive = openArchiveRead("/backups", "docs_backup", "dar", ro);
listArchive(archive, (path, entry) {
writefln("%s: %s (%d bytes)", entry.type, entry.name, entry.size);
});Error_Handling:
All functions that can fail throw DarException or one of its subclasses:
DarGenericException— General errorsDarMemoryException— Out of memoryDarRangeException— Range/bounds errorsDarFeatureException— Feature not availableDarDataException— Data corruptionDarSystemException— System/IO errors
See Also
License
Copyright
Types 85
Compression algorithm enum (mirrors libdar::compression).
Hash/checksum algorithm used for sidecar files during archive creation.
This enum corresponds to the shim's dar_hash_algo values and controls which .sha256/.sha1/etc. sidecar file is produced for the first slice.
Crypto algorithm enum (mirrors libdar::crypto_algo).
Used to specify the encryption algorithm for archive creation and reading.
Low-level list entry structure matching the C shim's dar_list_entry. Extended with ownership, timestamps, compression, and attribute flags.
char * nameuint typeulong sizeulong uidulong giduint permlong last_accesslong last_modiflong last_changeint compression_algoint is_hard_linkedint has_eaint has_fsaint is_sparseint is_dirtyconst(char) * symlink_targetulong major_deviceulong minor_deviceint codechar * msgFunction type for calculating signature block length based on file size.
Callback type for warning/info messages from libdar.
Callback type for file treatment progress (file being processed).
Callback type for displaying messages (user_interaction version, non-@nogc).
Parameters
message | the message to display (UTF-8) |
ctx | user-provided context pointer |
Callback type for yes/no questions (pause).
Parameters
message | the question to ask (UTF-8) |
ctx | user-provided context pointer |
Returns
Callback type to get a string answer from the user.
Parameters
message | the prompt to display (UTF-8) |
echo | 1 if input should be visible, 0 for hidden (password-style) |
ctx | user-provided context pointer |
Returns
Callback type to get a secure string answer from the user (for passwords/secrets).
Parameters
message | the prompt to display (UTF-8) |
echo | 1 if input should be visible, 0 for hidden (password-style) |
ctx | user-provided context pointer |
Returns
Note
Opaque user interaction handle for full libdar user_interaction support.
uint differentulong files_comparedulong files_checkedulong errorsuint differentulong files_comparedulong addedulong removedulong changedulong slice_sizeulong first_slice_sizeulong slice_numberulong archive_sizeulong catalog_sizeulong data_sizeulong storage_sizechar * compression_algochar * cipherchar * asymchar * user_commentchar * editionint is_signedint has_tape_marksulong treatedulong hard_linksulong skippedulong inode_onlyulong ignoredulong toooldulong erroredulong deletedulong ea_treatedulong fsa_treatedulong byte_amountMask types corresponding to libdar mask classes.
Secure password container that avoids GC copies and zeroizes memory on destruction.
This type allocates a C buffer to hold the password bytes, exposes a pointer for FFI, and wipes the memory before freeing it.
private ubyte * _pprivate size_t _lenSecurePassword fromString(string s) @trustedCreate from a D string (UTF-8 bytes are copied to a C buffer).const(ubyte) * ptr() @property const @safe @nogc nothrowPointer to the password bytes (may be null when empty).Canonical error codes returned by the shim functions.
Values mirror common conditions and map to specific libdar exception types. Zero means success.
Exception thrown by low-level binding upon shim errors. Serves as a base class for more specific DAR exceptions.
Enhanced with context fields that help diagnose failures.
int codeNumeric error code from the shim.string operationOperation name where the error occurred (e.g. "open", "create", "extract"). May be empty if not provided.string archivePathDirectory path containing the archive slices (may be empty).string archiveBaseArchive base name (may be empty).string archiveExtArchive extension (may be empty).string filePathFilesystem path relevant to the error (e.g. fsRoot for create, outDir for extract).this(string msg, int code)Base class for argument-related errors (invalid/null parameters).
this(string msg)Invalid state or handle misuse.
this(string msg)Generic catch-all error.
this(string msg)I/O related error (open/create/write failures).
this(string msg, int code = DarErrorCode.DAR_E_IO)Out-of-memory condition reported by libdar (Ememory).
this(string msg)Range error (Erange) — value out of expected range.
this(string msg)Feature not available (Efeature) — requested feature not compiled in or supported.
this(string msg)Hardware error (Ehardware) — disk or device failure.
this(string msg)User abort (Euser_abort) — operation cancelled by user.
this(string msg)Data error (Edata) — data corruption or integrity failure.
this(string msg)Compilation mismatch (Ecompilation) — library/application version incompatibility.
this(string msg)System error (Esystem) — OS-level error.
this(string msg)Network authentication error (Enet_auth) — remote authentication failure.
this(string msg)Internal bug (Ebug) — should not happen, indicates a bug in libdar.
this(string msg)Thread cancellation (Ethread_cancel) — operation cancelled due to thread termination.
this(string msg)Infinint arithmetic error (Einfinint) — arbitrary precision integer error.
this(string msg)Limited integer overflow (Elimitint) — integer overflow in limited precision mode.
this(string msg)Script execution error (Escript) — error executing user script/hook.
this(string msg)Opaque archive handle with destructor that calls the shim destroy function. Implemented as a class to avoid accidental double-destruction due to struct copying.
private dar_archive * _ptrprivate string _pathprivate string _baseprivate string _extbool isValid() @property const @safe @nogc nothrowReturns true if this handle holds a non-null pointer.const(dar_archive) * ptr() @property const @safe @nogc nothrowExpose raw pointer for low-level calls if needed.string path() @property const @safe @nogc nothrowPath where slices reside (may be empty if unknown).this(dar_archive * p)this(dar_archive * p, string path, string base, string ext)Construct with archive coordinates (path/base/ext).~thisDestroyer: releases the underlying handle if present.Entry type for archive listings.
Complete set of entry types matching libdar's internal representation. These correspond to the type characters used by libdar internally:
- 'f' = FILE (regular file)
- 'd' = DIR (directory)
- 'l' = SYMLINK (symbolic link)
- 'c' = CHAR_DEVICE (character device)
- 'b' = BLOCK_DEVICE (block device)
- 's' = UNIX_SOCKET (Unix domain socket)
- 'p' = NAMED_PIPE (named pipe / FIFO)
- 'o' = DOOR (Solaris-specific door)
- 'x' = REMOVED (removed entry marker in incremental archives)
D-side list entry used by callbacks and helpers.
Extended with ownership, timestamps, compression, and attribute flags.
string nameEntryType typeulong sizeulong uidulong giduint permlong lastAccesslong lastModiflong lastChangeDarCompression compressionAlgobool isHardLinkedbool hasEAbool hasFSAbool isSparsebool isDirtystring symlinkTargetTarget path for symbolic links (empty for non-symlinks or when unavailable).ulong majorDeviceMajor device number (valid for char/block devices; 0 otherwise).ulong minorDeviceMinor device number (valid for char/block devices; 0 otherwise).Result of comparing two archives.
uint different0 means identical per shim heuristic; 1 means different.ulong filesComparedNumber of files compared (placeholder value in shim).Enhanced diff result counters.
uint differentulong filesComparedulong addedulong removedulong changedChange detection policy for incremental backups.
Incremental backup mode.
IncrementalOptions controls how incremental/differential backups are created.
This class is a RAII wrapper over the shim incremental options and lets you define a reference archive, change detection policy, snapshot file, and the desired incremental mode.
private dar_incr_opts * _pvoid setReference(string path, string base, string ext, uint minDigits = 0) @safeSets the reference archive to compare against: its path, base, extension, and minimum digits for slice numbering.void getReference(out string path, out string base, out string ext, out uint minDigits) @safeGets the current reference archive info.void setChangePolicy(DarChangePolicy policy) @safeSets the change detection policy (by DATE or HASH).void setMode(DarIncrMode mode) @safeSets the incremental mode: INCREMENTAL, DIFFERENTIAL, or DECREMENTAL.this(dar_incr_opts * p)~thisDestructor releases the underlying options.Diff difference kinds
Result of testing (verifying) an archive.
ulong filesCheckedulong errorsTestOptions controls archive integrity testing behavior.
This class mirrors a subset of libdar's archive_options_test allowing you to select what to check and which entries to include in testing.
Example:
auto ro = ReadOptions.create();
ro.setExtension("dar");
auto h = openArchiveRead(outDir, "sample", "dar", ro);
auto to = TestOptions.create();
to.setCompareData(true);
to.addInclude("a.txt"); // only test a.txt
auto res = testArchive(h, to);
assert(res.filesChecked == 1);private dar_test_opts * _pvoid setCompareFSA(bool v) @safeEnable/disable filesystem-specific attributes comparison (default: disabled).void setDisplayTreated(bool display, bool onlyDir = false) @safeEnable/disable display of treated files and whether to show only directories.void getDisplayTreated(out bool display, out bool onlyDir) @safeGets the current display treated settings.void addInclude(string pattern) @safeAdds an include pattern (exact entry name) to the selection mask.this(dar_test_opts * p)~thisDestructor releases the underlying options.Archive summary containing metadata about an archive.
This struct provides information about the archive's structure, size, compression, encryption, and other properties. Obtain it via getArchiveSummary().
ulong sliceSizeSize of middle slices in bytes (0 if archive is not sliced).ulong firstSliceSizeSize of first slice in bytes (0 if archive is not sliced).ulong sliceNumberNumber of slices composing the archive (0 if unknown).ulong archiveSizeTotal archive size in bytes.ulong catalogSizeCatalog size in bytes (0 if unknown).ulong dataSizeUncompressed data size in bytes.ulong storageSizeCompressed/encrypted storage size in bytes.string compressionAlgoCompression algorithm name (e.g., "gzip", "none", "bzip2").string cipherEncryption cipher name (e.g., "aes256", "blowfish", "none").string asymAsymmetric encryption algorithm (empty if none).string userCommentUser comment stored in the archive (empty if none).string editionArchive format edition string.bool isSignedTrue if the archive is cryptographically signed.bool hasTapeMarksTrue if the archive has tape marks (for sequential reading).Operation statistics containing counters from archive operations.
This struct provides detailed statistics about files processed during backup, extraction, or test operations. Obtain it via the *WithStats variants of archive functions.
All fields are cumulative counters representing the number of items or bytes processed during the operation.
ulong treatedFiles/entries successfully treated/processed.ulong hardLinksHard links encountered during the operation.ulong skippedFiles skipped (e.g., due to filters or unchanged status).ulong inodeOnlyInode-only entries (metadata without data).ulong ignoredFiles ignored (e.g., excluded by filters).ulong toooldFiles too old for incremental backup consideration.ulong erroredFiles that encountered errors during processing.ulong deletedDeleted files (relevant for incremental backups).ulong eaTreatedExtended attributes treated/saved.ulong fsaTreatedFilesystem-specific attributes treated/saved.ulong byteAmountTotal bytes processed during the operation.MergeOptions RAII wrapper mapping to shim merge options.
private dar_merge_opts * _pvoid setOverwritePolicy(int policy) @safeint getOverwritePolicy() @safevoid setSlicing(ulong sliceSize, ulong firstSliceSize = 0) @safevoid getSlicing(out ulong sliceSize, out ulong firstSliceSize) @safevoid setCompression(DarCompression algo) @safeDarCompression getCompression() @safevoid setCompressionLevel(uint level) @safeuint getCompressionLevel() @safevoid setCompressionBlockSize(uint size) @safeuint getCompressionBlockSize() @safevoid setFilter(FilterOptions fo) @safebool hasFilter() @safethis(dar_merge_opts * p)~thisDestructor releases the underlying options.Represents an entry in the database listing.
string pathstring basestring extReadOptions RAII wrapper for minimal read options in the shim.
private dar_read_opts * _pvoid setPassword(ref const(SecurePassword) pw) @safeSets the decryption password from a secure container.ulong passwordLenForTest() @safe @nogc nothrowTest helper: returns current password length as seen by the shim.this(dar_read_opts * p)~thisDestructor releases the underlying options.DiffOptions RAII wrapper controlling comparison behavior.
private dar_diff_opts * _pDiffOptions create() @safevoid setCompareData(bool v) @safevoid setCompareMetadata(bool v) @safevoid setCompareEA(bool v) @safevoid setCompareFSA(bool v) @safebool getCompareData() @safebool getCompareMetadata() @safebool getCompareEA() @safebool getCompareFSA() @safethis(dar_diff_opts * p)ExtractOptions RAII wrapper mapping to libdar::archive_options_extract.
private dar_extract_opts * _pExtractOptions create() @safevoid setOverwritePolicy(int policy) @safeint getOverwritePolicy() @safevoid setFlat(bool flat) @safebool getFlat() @safevoid setWarnOverwrite(bool v) @safebool getWarnOverwrite() @safevoid setInfoDetails(bool v) @safebool getInfoDetails() @safevoid setDisplayTreated(bool display, bool onlyDir = false) @safevoid getDisplayTreated(out bool display, out bool onlyDir) @safevoid setDisplaySkipped(bool v) @safebool getDisplaySkipped() @safevoid setCompareFields(int cf) @safeint getCompareFields() @safevoid setDirtyBehavior(int db) @safeint getDirtyBehavior() @safevoid setWarnRemoveNoMatch(bool v) @safebool getWarnRemoveNoMatch() @safevoid setEmpty(bool v) @safebool getEmpty() @safevoid setEmptyDir(bool v) @safebool getEmptyDir() @safevoid setOnlyDeleted(bool v) @safebool getOnlyDeleted() @safevoid setIgnoreDeleted(bool v) @safebool getIgnoreDeleted() @safevoid setIgnoreUnixSockets(bool v) @safebool getIgnoreUnixSockets() @safevoid setInPlace(bool v) @safebool getInPlace() @safethis(dar_extract_opts * p)IsolateOptions RAII wrapper mapping to libdar::archive_options_isolate.
private dar_isolate_opts * _pIsolateOptions create() @safevoid setAllowOverwrite(bool v) @safebool getAllowOverwrite() @safevoid setWarnOverwrite(bool v) @safebool getWarnOverwrite() @safevoid setInfoDetails(bool v) @safebool getInfoDetails() @safevoid setCompression(DarCompression algo) @safeDarCompression getCompression() @safevoid setCompressionLevel(uint level) @safeuint getCompressionLevel() @safevoid setCompressionBlockSize(uint size) @safeuint getCompressionBlockSize() @safevoid setSlicing(ulong sliceSize, ulong firstSliceSize = 0) @safevoid getSlicing(out ulong sliceSize, out ulong firstSliceSize) @safethis(dar_isolate_opts * p)RepairOptions RAII wrapper mapping to repair options for xform-based repair. Supports overwrite policy, slicing parameters, slice permission and ownership.
private dar_repair_opts * _pvoid setOverwritePolicy(int policy) @safeint getOverwritePolicy() @safevoid setSlicing(ulong sliceSize, ulong firstSliceSize = 0) @safevoid getSlicing(out ulong sliceSize, out ulong firstSliceSize) @safevoid setSlicePerm(string perm) @safestring getSlicePerm() @safevoid setSliceUser(string user) @safestring getSliceUser() @safevoid setSliceGroup(string group) @safestring getSliceGroup() @safethis(dar_repair_opts * p)~thisDestructor releases the underlying options.CreateOptions RAII wrapper for minimal create options in the shim.
private dar_create_opts * _pvoid setSlicePerm(string perm) @safeSets slice permission string like "0644" or empty string to use umask.void setTapeMarks(bool on) @safeEnables or disables tape marks (sequential marks) in the created archive.void setUserComment(string comment) @safeSets the archive user comment to be stored in archive metadata.void setSliceUser(string user) @safeSets slice user ownership (username or UID string). Empty string uses default.void setSliceGroup(string group) @safeSets slice group ownership (group name or GID string). Empty string uses default.void setCompressionBlockSize(uint blockSize) @safeSets the compression block size for parallel compression.void setHashAlgo(DarHashAlgo algo) @safeSets the hash/checksum algorithm for sidecar file generation.void setPassword(ref const(SecurePassword) pw) @safeSets the encryption password from a secure container.ulong passwordLenForTest() @safe @nogc nothrowTest helper: returns current password length as seen by the shim.void setProgressCallback(dar_message_cb warningCb, dar_treated_cb treatedCb, void * ctx) @trustedSets progress callbacks for archive operations.void * getProgressContext() @trusted nothrow @nogcGets the progress callback context pointer (for verification/testing).void setSequentialMarks(bool val) @safeEnables or disables sequential marks (tape marks) in the archive.void setDeltaSignature(bool val) @safeEnables or disables storing delta signatures for future incremental backups.void setDeltaDiff(bool val) @safeEnables or disables computing binary delta using reference archive signatures.void setDeltaSigMinSize(ulong minSize) @safeSets the minimum file size for delta signature computation.ulong getDeltaSigMinSize() @safe @nogc nothrowGets the minimum file size for delta signature computation.void setSigBlockLen(DarDeltaSigBlockFunc fsFunction,
ulong multiplier = 1,
ulong divisor = 1,
uint minBlockLen = 2048,
uint maxBlockLen = 0) @safeSets the signature block length calculation parameters.void getSigBlockLen(out DarDeltaSigBlockFunc fsFunction,
out ulong multiplier,
out ulong divisor,
out uint minBlockLen,
out uint maxBlockLen) @safeGets the signature block length calculation parameters.this(dar_create_opts * p)~thisDestructor releases the underlying options.FilterOptions RAII wrapper for file filtering during archive operations.
Supports include/exclude glob patterns for filenames and paths, as well as size-based filtering. Use with createArchiveFiltered() to create archives that only include files matching the specified criteria.
Example:
auto fo = FilterOptions.create();
fo.addInclude("*.txt"); // Include all .txt files
fo.addInclude("*.md"); // Also include .md files
fo.addExclude("*.bak"); // Exclude backup files
fo.addExcludePath("cache"); // Exclude cache directories
auto co = CreateOptions.create();
auto arc = createArchiveFiltered("/home/user", "/backups", "docs", "dar", co, fo);private dar_filter_opts * _pFilterOptions create() @safeFactory: allocate a new filter options object with default settings (no filtering).void addIncludePath(string pattern) @safeAdds a path-based include pattern (glob-style) for subtree filtering.void addExcludePath(string pattern) @safeAdds a path-based exclude pattern (glob-style) for subtree filtering.void addEaInclude(string pattern) @safeAdds an Extended Attribute (EA) include pattern (glob-style).void addEaExclude(string pattern) @safeAdds an Extended Attribute (EA) exclude pattern (glob-style).const(dar_filter_opts) * ptr() @property const @safe @nogc nothrowReturns the underlying C pointer (for use with shim functions).this(dar_filter_opts * p)~thisDestructor releases the underlying options.DarSlave: RAII wrapper for remote archive serving via pipes.
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.
This is useful for:
- Network archive access (archive on remote machine, dar on local)
- Tape/sequential media access
- Privilege separation (archive reader with different permissions)
Example:
// Create slave using named pipes
auto slave = DarSlave.create("/archives", "backup", "dar", "input_fifo", "output_fifo");
// Run blocks until master disconnects
slave.run();private dar_slave * _pDarSlave create(string folder, string basename, string extension,
string inputPipe = "", string outputPipe = "",
string execute = "", uint minDigits = 0) @safeCreates a DarSlave instance using named pipes.DarSlave createFromFds(string folder, string basename, string extension,
int inputFd, int outputFd,
string execute = "", uint minDigits = 0) @safeCreates a DarSlave instance using file descriptors.this(dar_slave * p)~thisDestructor releases the underlying slave handle.Mask: RAII wrapper for libdar's mask class hierarchy.
Masks are used to filter files during archive operations. This class provides access to libdar's complete mask class hierarchy including:
bool_mask— always true or always falsesimple_mask— glob patterns (shell wildcards like *.txt)regular_mask— POSIX regular expressionsnot_mask— negation of another masket_mask— AND combination of multiple masksou_mask— OR combination of multiple maskssimple_path_mask— path-based matching (subdir relationships)same_path_mask— exact path matchingexclude_dir_mask— directory exclusion
Example:
// Create a glob mask for .txt files
auto txtMask = Mask.glob("*.txt");
assert(txtMask.isCovered("file.txt"));
assert(!txtMask.isCovered("file.doc"));
// Create an OR combination
auto orMask = Mask.orMask();
orMask.add(Mask.glob("*.txt"));
orMask.add(Mask.glob("*.md"));
assert(orMask.isCovered("readme.md"));
// Create a NOT mask
auto notBak = Mask.notMask(Mask.glob("*.bak"));
assert(notBak.isCovered("file.txt"));
assert(!notBak.isCovered("file.bak"));private dar_mask * _pMask glob(string pattern, bool caseSensitive = true) @safeCreates a glob pattern mask (shell-style wildcards).Mask simplePath(string path, bool caseSensitive = true) @safeCreates a simple path mask (matches if path is subdir of mask or vice versa).Mask samePath(string path, bool caseSensitive = true) @safeCreates a same path mask (exact path matching, no wildcards).Mask excludeDir(string path, bool caseSensitive = true) @safeCreates an exclude directory mask (matches path and all subdirectories).this(dar_mask * p)UserInteractionHandle: RAII wrapper for libdar's user_interaction class.
This class provides access to libdar's full user interaction mechanism, allowing custom implementations of all user interaction methods:
message— display information/warning messagespause— ask yes/no questionsgetString— prompt for arbitrary string inputgetSecuString— prompt for sensitive input like passwords
Example:
// Create a blind user interaction (non-interactive)
auto ui = UserInteractionHandle.createBlind();
assert(ui.isValid);
// Create with custom callbacks (for interactive applications)
extern(C) void myMessage(const char* msg, void* ctx) nothrow { /+ display msg +/ }
extern(C) int myPause(const char* msg, void* ctx) nothrow { return 0; /+ no +/ }
extern(C) char* myGetString(const char* msg, int echo, void* ctx) nothrow { return null; }
extern(C) char* myGetSecuString(const char* msg, int echo, void* ctx) nothrow { return null; }
auto customUI = UserInteractionHandle.create(&myMessage, &myPause, &myGetString, &myGetSecuString, null);private dar_user_interaction * _pUserInteractionHandle create(dar_ui_message_cb messageCb,
dar_pause_cb pauseCb,
dar_get_string_cb getStringCb,
dar_get_secu_string_cb getSecuStringCb,
void * ctx = null) @safeCreates a user interaction handle with custom callbacks.UserInteractionHandle createBlind() @safeCreates a blind user interaction (no prompts, default answers).dar_user_interaction * ptr() @property @safe @nogc nothrowReturns the underlying C pointer (for use with shim functions).this(dar_user_interaction * p)~thisDestructor releases the underlying handle.Functions 359
int ddn_dar_shim_probe()const(char) * dar_get_version_string()void dar_free_string(const char * s)dar_err dar_ok()dar_err dar_make_generic_error()dar_err dar_make_range_error()dar_err dar_make_feature_error()dar_err dar_make_data_error()dar_err dar_archive_destroy(dar_archive * h)dar_err dar_read_opts_create(dar_read_opts * * outPtr)dar_err dar_read_opts_destroy(dar_read_opts * o)dar_err dar_read_opts_set_extension(dar_read_opts * o, const char * ext)dar_err dar_read_opts_get_extension(const dar_read_opts * o, const char * * out_ext)dar_err dar_read_opts_set_min_digits(dar_read_opts * o, uint min_digits)dar_err dar_read_opts_get_min_digits(const dar_read_opts * o, uint * out_min_digits)dar_err dar_create_opts_create(dar_create_opts * * outPtr)dar_err dar_create_opts_destroy(dar_create_opts * o)dar_err dar_create_opts_set_slice_size(dar_create_opts * o, ulong slice_size)dar_err dar_create_opts_get_slice_size(const dar_create_opts * o, ulong * out_slice_size)dar_err dar_create_opts_set_first_slice_size(dar_create_opts * o, ulong first_slice_size)dar_err dar_create_opts_get_first_slice_size(const dar_create_opts * o, ulong * out_first_slice_size)dar_err dar_create_opts_set_allow_overwrite(dar_create_opts * o, int allow_overwrite)dar_err dar_create_opts_get_allow_overwrite(const dar_create_opts * o, int * out_allow_overwrite)dar_err dar_create_opts_set_warn_overwrite(dar_create_opts * o, int warn_overwrite)dar_err dar_create_opts_get_warn_overwrite(const dar_create_opts * o, int * out_warn_overwrite)dar_err dar_create_opts_set_slice_perm(dar_create_opts * o, const char * perm)dar_err dar_create_opts_get_slice_perm(const dar_create_opts * o, const char * * out_perm)dar_err dar_create_opts_set_tape_marks(dar_create_opts * o, int tape_marks)dar_err dar_create_opts_get_tape_marks(const dar_create_opts * o, int * out_tape_marks)dar_err dar_create_opts_set_user_comment(dar_create_opts * o, const char * comment)dar_err dar_create_opts_get_user_comment(const dar_create_opts * o, const char * * out_comment)dar_err dar_create_opts_set_slice_user(dar_create_opts * o, const char * user)dar_err dar_create_opts_get_slice_user(const dar_create_opts * o, const char * * out_user)dar_err dar_create_opts_set_slice_group(dar_create_opts * o, const char * group)dar_err dar_create_opts_get_slice_group(const dar_create_opts * o, const char * * out_group)dar_err dar_create_opts_set_execute(dar_create_opts * o, const char * cmd)dar_err dar_create_opts_get_execute(const dar_create_opts * o, const char * * out_cmd)dar_err dar_create_opts_set_compression(dar_create_opts * o, int algo)dar_err dar_create_opts_get_compression(const dar_create_opts * o, int * out_algo)dar_err dar_create_opts_set_compression_level(dar_create_opts * o, uint level)dar_err dar_create_opts_get_compression_level(const dar_create_opts * o, uint * out_level)dar_err dar_create_opts_set_compression_block_size(dar_create_opts * o, uint block_size)dar_err dar_create_opts_get_compression_block_size(const dar_create_opts * o, uint * out_block_size)dar_err dar_create_opts_set_hash_algo(dar_create_opts * o, int algo)dar_err dar_create_opts_get_hash_algo(const dar_create_opts * o, int * out_algo)dar_err dar_create_opts_set_crypto_algo(dar_create_opts * o, int algo)dar_err dar_create_opts_get_crypto_algo(const dar_create_opts * o, int * out_algo)dar_err dar_create_opts_set_crypto_size(dar_create_opts * o, uint size)dar_err dar_create_opts_get_crypto_size(const dar_create_opts * o, uint * out_size)dar_err dar_read_opts_set_crypto_algo(dar_read_opts * o, int algo)dar_err dar_read_opts_get_crypto_algo(const dar_read_opts * o, int * out_algo)dar_err dar_read_opts_set_crypto_size(dar_read_opts * o, uint size)dar_err dar_read_opts_get_crypto_size(const dar_read_opts * o, uint * out_size)dar_err dar_read_opts_set_password(dar_read_opts * o, const(ubyte) * pw, ulong pw_len)dar_err dar_read_opts_clear_password(dar_read_opts * o)dar_err dar_create_opts_set_password(dar_create_opts * o, const(ubyte) * pw, ulong pw_len)dar_err dar_create_opts_clear_password(dar_create_opts * o)ulong dar_read_opts_password_len(const(dar_read_opts) * o)ulong dar_create_opts_password_len(const(dar_create_opts) * o)dar_err dar_read_opts_set_remote(dar_read_opts * o, const char * url)dar_err dar_read_opts_get_remote(const(dar_read_opts) * o, const char * * out_url)dar_err dar_create_opts_set_remote(dar_create_opts * o, const char * url)dar_err dar_create_opts_get_remote(const(dar_create_opts) * o, const char * * out_url)dar_err dar_read_opts_set_sequential_read(dar_read_opts * o, int val)dar_err dar_read_opts_get_sequential_read(const(dar_read_opts) * o, int * out_val)dar_err dar_create_opts_set_sequential_marks(dar_create_opts * o, int val)dar_err dar_create_opts_get_sequential_marks(const(dar_create_opts) * o, int * out_val)dar_err dar_create_opts_set_backup_hook_execute(dar_create_opts * o, const char * execute)dar_err dar_create_opts_get_backup_hook_execute(const(dar_create_opts) * o, const char * * out_execute)dar_err dar_create_opts_add_backup_hook_file(dar_create_opts * o, const char * pattern)dar_err dar_create_opts_clear_backup_hook_files(dar_create_opts * o)dar_err dar_create_opts_set_delta_signature(dar_create_opts * o, int val)int dar_create_opts_get_delta_signature(const(dar_create_opts) * o)dar_err dar_create_opts_set_delta_diff(dar_create_opts * o, int val)int dar_create_opts_get_delta_diff(const(dar_create_opts) * o)dar_err dar_create_opts_set_delta_sig_min_size(dar_create_opts * o, ulong min_size)ulong dar_create_opts_get_delta_sig_min_size(const(dar_create_opts) * o)dar_err dar_create_opts_set_sig_block_len(dar_create_opts * o,
int fs_function,
ulong multiplier,
ulong divisor,
uint min_block_len,
uint max_block_len)void dar_create_opts_get_sig_block_len(const(dar_create_opts) * o,
int * fs_function,
ulong * multiplier,
ulong * divisor,
uint * min_block_len,
uint * max_block_len)dar_err dar_create_opts_set_progress_cb(dar_create_opts * o,
dar_message_cb warning_cb,
dar_treated_cb treated_cb,
void * ctx)Set progress callbacks on create options. Pass null to disable a callback.void * dar_create_opts_get_progress_ctx(const(dar_create_opts) * o)Get progress callback context from create options (for verification).dar_err dar_user_interaction_create(dar_ui_message_cb message_cb,
dar_pause_cb pause_cb,
dar_get_string_cb get_string_cb,
dar_get_secu_string_cb get_secu_string_cb,
void * ctx,
dar_user_interaction * * outPtr)Create a user interaction object with full callback support.dar_err dar_user_interaction_create_blind(dar_user_interaction * * outPtr)Create a blind user interaction (no prompts, default answers).dar_err dar_user_interaction_destroy(dar_user_interaction * ui)Destroy a user interaction object. Safe to call with null.dar_err dar_read_opts_set_user_interaction(dar_read_opts * o, dar_user_interaction * ui)Set the user interaction on read options.dar_err dar_create_opts_set_user_interaction(dar_create_opts * o, dar_user_interaction * ui)Set the user interaction on create options.dar_err dar_extract_opts_create(dar_extract_opts * * outPtr)dar_err dar_extract_opts_destroy(dar_extract_opts * eo)dar_err dar_extract_opts_set_flat(dar_extract_opts * eo, int flat)dar_err dar_extract_opts_set_warn_over(dar_extract_opts * eo, int warn_over)dar_err dar_extract_opts_set_info_details(dar_extract_opts * eo, int info_details)dar_err dar_extract_opts_set_display_treated(dar_extract_opts * eo, int display_treated, int only_dir)dar_err dar_extract_opts_set_display_skipped(dar_extract_opts * eo, int display_skipped)dar_err dar_extract_opts_set_compare_fields(dar_extract_opts * eo, int compare_fields)dar_err dar_extract_opts_set_dirty_behavior(dar_extract_opts * eo, int dirty_behavior)dar_err dar_extract_opts_set_overwrite_policy(dar_extract_opts * eo, int policy)dar_err dar_extract_opts_set_warn_remove_no_match(dar_extract_opts * eo, int warn_remove_no_match)dar_err dar_extract_opts_set_empty(dar_extract_opts * eo, int empty)dar_err dar_extract_opts_set_empty_dir(dar_extract_opts * eo, int empty_dir)dar_err dar_extract_opts_set_only_deleted(dar_extract_opts * eo, int only_deleted)dar_err dar_extract_opts_set_ignore_deleted(dar_extract_opts * eo, int ignore_deleted)dar_err dar_extract_opts_set_ignore_unix_sockets(dar_extract_opts * eo, int ignore_unix_sockets)dar_err dar_extract_opts_set_in_place(dar_extract_opts * eo, int in_place)int dar_extract_opts_get_flat(const(dar_extract_opts) * eo)int dar_extract_opts_get_warn_over(const(dar_extract_opts) * eo)int dar_extract_opts_get_info_details(const(dar_extract_opts) * eo)void dar_extract_opts_get_display_treated(const(dar_extract_opts) * eo, int * display_treated, int * only_dir)int dar_extract_opts_get_display_skipped(const(dar_extract_opts) * eo)int dar_extract_opts_get_compare_fields(const(dar_extract_opts) * eo)int dar_extract_opts_get_dirty_behavior(const(dar_extract_opts) * eo)int dar_extract_opts_get_overwrite_policy(const(dar_extract_opts) * eo)int dar_extract_opts_get_warn_remove_no_match(const(dar_extract_opts) * eo)int dar_extract_opts_get_empty(const(dar_extract_opts) * eo)int dar_extract_opts_get_empty_dir(const(dar_extract_opts) * eo)int dar_extract_opts_get_only_deleted(const(dar_extract_opts) * eo)int dar_extract_opts_get_ignore_deleted(const(dar_extract_opts) * eo)int dar_extract_opts_get_ignore_unix_sockets(const(dar_extract_opts) * eo)int dar_extract_opts_get_in_place(const(dar_extract_opts) * eo)dar_err dar_extract_opts_set_filter(dar_extract_opts * eo, const(dar_filter_opts) * fo)int dar_extract_opts_has_filter(const(dar_extract_opts) * eo)dar_err dar_archive_extract_with_opts(const(dar_archive) * h, const char * out_dir, const(dar_extract_opts) * eo)dar_err dar_archive_extract_with_opts_and_stats(const(dar_archive) * h, const char * out_dir, const(dar_extract_opts) * eo, dar_operation_stats * stats)dar_err dar_archive_open_read(const char * path, const char * base, const char * ext, const(dar_read_opts) * ro, dar_archive * * outHandle)dar_err dar_archive_list(const(dar_archive) * h, dar_list_cb cb, void * ctx)dar_err dar_archive_create_full(const char * fs_root,
const char * out_dir,
const char * base,
const char * ext,
const(dar_create_opts) * co,
dar_archive * * outHandle)dar_err dar_archive_get_children(const(dar_archive) * h, const char * path, dar_list_cb cb, void * ctx)dar_err dar_archive_extract(const(dar_archive) * h, const char * out_dir)dar_err dar_archive_diff(const(dar_archive) * a, const(dar_archive) * b, dar_diff_result * outRes)dar_err dar_archive_test(const(dar_archive) * h, dar_test_result * outRes)dar_err dar_test_opts_create(dar_test_opts * * outPtr)dar_err dar_test_opts_destroy(dar_test_opts * to)dar_err dar_test_opts_set_compare_data(dar_test_opts * to, int v)dar_err dar_test_opts_set_compare_ea(dar_test_opts * to, int v)dar_err dar_test_opts_set_compare_fsa(dar_test_opts * to, int v)dar_err dar_test_opts_set_info_details(dar_test_opts * to, int v)dar_err dar_test_opts_set_display_treated(dar_test_opts * to, int display_treated, int only_dir)dar_err dar_test_opts_add_include(dar_test_opts * to, const char * pattern)int dar_test_opts_get_compare_data(const(dar_test_opts) * to)int dar_test_opts_get_compare_ea(const(dar_test_opts) * to)int dar_test_opts_get_compare_fsa(const(dar_test_opts) * to)int dar_test_opts_get_info_details(const(dar_test_opts) * to)void dar_test_opts_get_display_treated(const(dar_test_opts) * to, int * display_treated, int * only_dir)uint dar_test_opts_include_count(const(dar_test_opts) * to)dar_err dar_test_opts_get_include_at(const(dar_test_opts) * to, uint idx, const char * * out_pattern)dar_err dar_archive_test_with_opts(const(dar_archive) * h, const(dar_test_opts) * to, dar_test_result * outRes)dar_err dar_archive_isolate(const(dar_archive) * h, const char * out_dir, dar_archive * * outHandle)dar_err dar_archive_repair(const char * path, const char * base, const char * ext, dar_archive * * outHandle)dar_err dar_repair_opts_create(dar_repair_opts * * outPtr)dar_err dar_repair_opts_destroy(dar_repair_opts * ro)dar_err dar_repair_opts_set_overwrite_policy(dar_repair_opts * ro, int policy)int dar_repair_opts_get_overwrite_policy(const(dar_repair_opts) * ro)dar_err dar_repair_opts_set_slicing(dar_repair_opts * ro, ulong slice_size, ulong first_slice_size)void dar_repair_opts_get_slicing(const(dar_repair_opts) * ro, ulong * slice_size, ulong * first_slice_size)dar_err dar_repair_opts_set_slice_perm(dar_repair_opts * ro, const char * perm)dar_err dar_repair_opts_get_slice_perm(const(dar_repair_opts) * ro, const char * * out_perm)dar_err dar_repair_opts_set_slice_user(dar_repair_opts * ro, const char * user)dar_err dar_repair_opts_get_slice_user(const(dar_repair_opts) * ro, const char * * out_user)dar_err dar_repair_opts_set_slice_group(dar_repair_opts * ro, const char * group)dar_err dar_repair_opts_get_slice_group(const(dar_repair_opts) * ro, const char * * out_group)dar_err dar_archive_repair_with_opts(const char * path, const char * base, const char * ext, const(dar_repair_opts) * ro, dar_archive * * outHandle)dar_err dar_diff_opts_create(dar_diff_opts * * outPtr)dar_err dar_diff_opts_destroy(dar_diff_opts * o)dar_err dar_diff_opts_set_compare_data(dar_diff_opts * o, int v)dar_err dar_diff_opts_set_compare_metadata(dar_diff_opts * o, int v)dar_err dar_diff_opts_set_compare_ea(dar_diff_opts * o, int v)dar_err dar_diff_opts_set_compare_fsa(dar_diff_opts * o, int v)int dar_diff_opts_get_compare_data(const(dar_diff_opts) * o)int dar_diff_opts_get_compare_metadata(const(dar_diff_opts) * o)int dar_diff_opts_get_compare_ea(const(dar_diff_opts) * o)int dar_diff_opts_get_compare_fsa(const(dar_diff_opts) * o)dar_err dar_archive_diff_ex(const(dar_archive) * a,
const(dar_archive) * b,
const(dar_diff_opts) * opts,
dar_diff_result_ex * outRes,
dar_diff_cb cb,
void * ctx)dar_err dar_archive_create_incremental(const char * fs_root,
const char * out_dir,
const char * base,
const char * ext,
const(dar_create_opts) * co,
dar_archive * * outHandle)dar_err dar_archive_merge(const(dar_archive) * baseArch,
const(dar_archive) * diffArch,
const char * out_dir,
const char * merged_base,
const char * ext,
dar_archive * * outHandle)dar_err dar_incr_opts_create(dar_incr_opts * * outPtr)dar_err dar_incr_opts_destroy(dar_incr_opts * io)dar_err dar_incr_opts_set_reference(dar_incr_opts * io, const char * path, const char * base, const char * ext, uint min_digits)dar_err dar_incr_opts_get_reference(const(dar_incr_opts) * io, const char * * path, const char * * base, const char * * ext, uint * min_digits)dar_err dar_incr_opts_set_change_policy(dar_incr_opts * io, int policy)int dar_incr_opts_get_change_policy(const(dar_incr_opts) * io)dar_err dar_incr_opts_set_snapshot(dar_incr_opts * io, const char * filename)dar_err dar_incr_opts_get_snapshot(const(dar_incr_opts) * io, const char * * filename)dar_err dar_incr_opts_set_mode(dar_incr_opts * io, int mode)int dar_incr_opts_get_mode(const(dar_incr_opts) * io)dar_err dar_archive_create_incremental_with_opts(const char * fs_root,
const char * out_dir,
const char * base,
const char * ext,
const(dar_create_opts) * co,
const(dar_incr_opts) * io,
dar_archive * * outHandle)dar_err dar_merge_opts_create(dar_merge_opts * * outPtr)dar_err dar_merge_opts_destroy(dar_merge_opts * mo)dar_err dar_merge_opts_set_overwrite_policy(dar_merge_opts * mo, int policy)int dar_merge_opts_get_overwrite_policy(const(dar_merge_opts) * mo)dar_err dar_merge_opts_set_slicing(dar_merge_opts * mo, ulong slice_size, ulong first_slice_size)void dar_merge_opts_get_slicing(const(dar_merge_opts) * mo, ulong * slice_size, ulong * first_slice_size)dar_err dar_merge_opts_set_compression(dar_merge_opts * mo, int algo)int dar_merge_opts_get_compression(const(dar_merge_opts) * mo)dar_err dar_merge_opts_set_compression_level(dar_merge_opts * mo, uint level)uint dar_merge_opts_get_compression_level(const(dar_merge_opts) * mo)dar_err dar_merge_opts_set_compression_block_size(dar_merge_opts * mo, uint block_size)uint dar_merge_opts_get_compression_block_size(const(dar_merge_opts) * mo)dar_err dar_merge_opts_set_filter(dar_merge_opts * mo, const(dar_filter_opts) * fo)int dar_merge_opts_has_filter(const(dar_merge_opts) * mo)dar_err dar_archive_merge_with_opts(const(dar_archive) * baseArch,
const(dar_archive) * diffArch,
const char * out_dir,
const char * merged_base,
const char * ext,
const(dar_merge_opts) * mo,
dar_archive * * outHandle)dar_err dar_archive_get_summary(const(dar_archive) * h, dar_archive_summary * out_summary)void dar_archive_summary_clear(dar_archive_summary * s)void dar_operation_stats_init(dar_operation_stats * s)dar_err dar_archive_create_full_with_stats(const char * fs_root,
const char * out_dir,
const char * base,
const char * ext,
const(dar_create_opts) * co,
dar_archive * * outHandle,
dar_operation_stats * stats)dar_err dar_archive_extract_with_stats(const(dar_archive) * h,
const char * out_dir,
dar_operation_stats * stats)dar_err dar_archive_test_with_stats(const(dar_archive) * h,
dar_test_result * out_result,
dar_operation_stats * stats)dar_err dar_isolate_opts_create(dar_isolate_opts * * outPtr)dar_err dar_isolate_opts_destroy(dar_isolate_opts * io)dar_err dar_isolate_opts_set_allow_over(dar_isolate_opts * io, int allow_over)dar_err dar_isolate_opts_set_warn_over(dar_isolate_opts * io, int warn_over)dar_err dar_isolate_opts_set_info_details(dar_isolate_opts * io, int info_details)dar_err dar_isolate_opts_set_compression(dar_isolate_opts * io, int algo)dar_err dar_isolate_opts_set_compression_level(dar_isolate_opts * io, uint level)dar_err dar_isolate_opts_set_compression_block_size(dar_isolate_opts * io, uint block_size)dar_err dar_isolate_opts_set_slicing(dar_isolate_opts * io, ulong slice_size, ulong first_slice_size)int dar_isolate_opts_get_allow_over(const(dar_isolate_opts) * io)int dar_isolate_opts_get_warn_over(const(dar_isolate_opts) * io)int dar_isolate_opts_get_info_details(const(dar_isolate_opts) * io)int dar_isolate_opts_get_compression(const(dar_isolate_opts) * io)uint dar_isolate_opts_get_compression_level(const(dar_isolate_opts) * io)uint dar_isolate_opts_get_compression_block_size(const(dar_isolate_opts) * io)void dar_isolate_opts_get_slicing(const(dar_isolate_opts) * io, ulong * slice_size, ulong * first_slice_size)dar_err dar_archive_isolate_with_opts(const(dar_archive) * h, const char * out_dir, const(dar_isolate_opts) * io, dar_archive * * outHandle)dar_err dar_filter_opts_create(dar_filter_opts * * outPtr)dar_err dar_filter_opts_destroy(dar_filter_opts * fo)dar_err dar_filter_opts_add_include(dar_filter_opts * fo, const char * pattern)dar_err dar_filter_opts_add_exclude(dar_filter_opts * fo, const char * pattern)dar_err dar_filter_opts_add_include_path(dar_filter_opts * fo, const char * pattern)dar_err dar_filter_opts_add_exclude_path(dar_filter_opts * fo, const char * pattern)dar_err dar_filter_opts_add_ea_include(dar_filter_opts * fo, const char * pattern)dar_err dar_filter_opts_add_ea_exclude(dar_filter_opts * fo, const char * pattern)dar_err dar_filter_opts_set_min_size(dar_filter_opts * fo, ulong min_size)dar_err dar_filter_opts_get_min_size(const(dar_filter_opts) * fo, ulong * out_min_size)dar_err dar_filter_opts_set_max_size(dar_filter_opts * fo, ulong max_size)dar_err dar_filter_opts_get_max_size(const(dar_filter_opts) * fo, ulong * out_max_size)dar_err dar_filter_opts_set_case_sensitive(dar_filter_opts * fo, int case_sensitive)dar_err dar_filter_opts_get_case_sensitive(const(dar_filter_opts) * fo, int * out_case_sensitive)dar_err dar_archive_create_full_filtered(const char * fs_root,
const char * out_dir,
const char * base,
const char * ext,
const(dar_create_opts) * co,
const(dar_filter_opts) * fo,
dar_archive * * outHandle,
dar_operation_stats * stats)dar_err dar_xform_create_from_path(const char * path,
const char * basename,
const char * extension,
uint min_digits,
const char * execute,
dar_xform * * outHandle)dar_err dar_xform_create_from_pipe(const char * pipename,
dar_xform * * outHandle)dar_err dar_xform_create_from_fd(int fd,
dar_xform * * outHandle)dar_err dar_xform_destroy(dar_xform * xf)dar_err dar_xform_to_dir(dar_xform * xf,
const char * path,
const char * basename,
const char * extension,
int allow_over,
int warn_over,
ulong first_slice_size,
ulong slice_size,
const char * slice_perm,
const char * slice_user,
const char * slice_group,
uint min_digits,
const char * execute)dar_err dar_xform_to_fd(dar_xform * xf,
int fd,
const char * execute)int dar_feat_largefile()int dar_feat_thread_safe()int dar_feat_libz()int dar_feat_libbz2()int dar_feat_libxz()int dar_feat_liblz4()int dar_feat_libzstd()int dar_feat_libgcrypt()int dar_feat_librsync()int dar_feat_remote_repository()int dar_feat_ftp_repository()int dar_feat_sftp_repository()int dar_feat_posix_fadvise()uint dar_feat_bits()char dar_feat_system_endian()ulong dar_feat_thread_stack_size()const(char) * dar_feat_libthreadar_version()dar_err dar_database_create_empty(dar_database * * outDb)dar_err dar_database_load(const char * filename, dar_database * * outDb)dar_err dar_database_dump(const(dar_database) * db, const char * filename)dar_err dar_database_destroy(dar_database * db)dar_err dar_database_add_archive(dar_database * db, const char * path, const char * base, const char * ext)dar_err dar_database_remove_range(dar_database * db, uint min_index, uint max_index)dar_err dar_database_list(const(dar_database) * db, dar_db_list_cb cb, void * ctx)dar_err dar_slave_create(const char * folder,
const char * basename,
const char * extension,
const char * input_pipe,
const char * output_pipe,
const char * execute,
uint min_digits,
dar_slave * * outHandle)Create a dar_slave instance using named pipes.dar_err dar_slave_create_from_fds(const char * folder,
const char * basename,
const char * extension,
int input_fd,
int output_fd,
const char * execute,
uint min_digits,
dar_slave * * outHandle)Create a dar_slave instance using file descriptors.dar_err dar_slave_run(dar_slave * s)Run the slave, serving archive data until the master disconnects.dar_err dar_mask_create_bool(int value, dar_mask * * outMask)Create a bool_mask (always returns the given boolean value).dar_err dar_mask_create_simple(const char * pattern, int case_sensitive, dar_mask * * outMask)Create a simple_mask (glob pattern matching like shell wildcards).dar_err dar_mask_create_regex(const char * pattern, int case_sensitive, dar_mask * * outMask)Create a regular_mask (POSIX regular expression matching).dar_err dar_mask_create_not(const(dar_mask) * inner, dar_mask * * outMask)Create a not_mask (negation of another mask).dar_err dar_mask_create_and(dar_mask * * outMask)Create an et_mask (AND combination, initially empty).dar_err dar_mask_create_or(dar_mask * * outMask)Create an ou_mask (OR combination, initially empty).dar_err dar_mask_create_simple_path(const char * path, int case_sensitive, dar_mask * * outMask)Create a simplepathmask (matches if path is subdir of mask or vice versa).dar_err dar_mask_create_same_path(const char * path, int case_sensitive, dar_mask * * outMask)Create a samepathmask (exact path matching, no wildcards).dar_err dar_mask_create_exclude_dir(const char * path, int case_sensitive, dar_mask * * outMask)Create an excludedirmask (matches path and all its subdirectories).dar_err dar_mask_add(dar_mask * combination, const(dar_mask) * toAdd)Add a mask to an AND or OR combination.uint dar_mask_size(const(dar_mask) * combination)Get the number of masks in an AND or OR combination.dar_err dar_mask_is_covered(const(dar_mask) * m, const char * expression, int * result)Test if a string is covered by the mask.dar_err dar_mask_dump(const(dar_mask) * m, const char * * outDump)Get a human-readable dump of the mask structure.dar_err dar_cancel_thread(ulong tid, int immediate, ulong flag)Request cancellation of a libdar operation in the specified thread.dar_err dar_cancel_clear(ulong tid, int * was_pending)Clear a pending cancellation request for a thread.bool featureLargefile() @safe @nogc nothrowReturns true if libdar was built with largefile (>2GiB) support.bool featureLibrsync() @safe @nogc nothrowReturns true if librsync (delta compression) is available.bool featureRemoteRepository() @safe @nogc nothrowReturns true if remote repositories are supported.uint featureBits() @safe @nogc nothrowReturns the internal integer bits used by libdar (0 means infinint).char featureSystemEndian() @safe @nogc nothrowReturns the system endian reported by libdar ('B' big, 'L' little).ulong featureThreadStackSize() @safe @nogc nothrowReturns the configured thread stack size for libdar threads (0 means default).string featureLibthreadarVersion() @safeReturns the libthreadar version string, or empty if not available.ulong getThreadId() @safe @nogc nothrowReturns the current thread ID for use with cancellation functions.void cancelThread(ulong tid, bool immediate = true, ulong flag = 0) @safeRequest cancellation of a libdar operation in the specified thread.DarException makeException(int code, string msg) @safeInternal: create specific exception instance based on error code.void throwOnError(dar_err e, string operation) @safeThrows a DarException enriched with operation name.void throwOnError(dar_err e, string operation, string path, string base, string ext) @safeThrows a DarException enriched with archive coordinates.void throwOnError(dar_err e, string operation, string filePath) @safeThrows a DarException enriched with a related filesystem path.void throwOnError(dar_err e, string operation, string path, string base, string ext, string filePath) @safeThrows a DarException enriched with both archive coordinates and a filesystem path.ArchiveHandle openArchiveRead(string path, string base, string ext, ReadOptions ro = null) @safeOpens an archive for reading using minimal parameters.void listArchive(const ArchiveHandle h, scope void delegate(string path, ListEntry entry) @safe cb) @safeLists archive entries, invoking the provided callback for each one.void listChildren(const ArchiveHandle h, string path, scope void delegate(string parent, ListEntry entry) @safe cb) @safeLists children of a given path inside the archive, invoking the callback.void extractArchive(const ArchiveHandle h, string outDir) @safeExtracts the archive contents to the provided output directory.void extractArchive(const ArchiveHandle h, string outDir, ExtractOptions eo) @safeExtract archive using custom ExtractOptions.DiffResult diffArchives(const ArchiveHandle a, const ArchiveHandle b) @safeCompares two archives and returns a simple diff result.DiffResultEx diffArchives(const ArchiveHandle a,
const ArchiveHandle b,
DiffOptions opts,
scope void delegate(DiffKind kind, string path) @safe @nogc onDiff = null) @safeDiff two archives with options and an optional callback for each difference.TestResult testArchive(const ArchiveHandle h) @safeVerifies archive integrity by checking all stored files.TestResult testArchive(const ArchiveHandle h, TestOptions to) @safeTests an archive using custom TestOptions.ArchiveSummary getArchiveSummary(const ArchiveHandle h) @safeRetrieves summary metadata for an open archive.ArchiveHandle createArchiveWithStats(string fsRoot, string outDir, string base, string ext,
CreateOptions co, out OperationStats stats) @safeCreates an archive with full operation statistics.void extractArchiveWithStats(const ArchiveHandle h, string outDir, out OperationStats stats) @safeExtracts an archive with full operation statistics.void extractArchiveWithStats(const ArchiveHandle h, string outDir, ExtractOptions eo, out OperationStats stats) @safeExtract with options and operation statistics.TestResult testArchiveWithStats(const ArchiveHandle h, out OperationStats stats) @safeTests archive integrity with full operation statistics.ArchiveHandle createArchiveFiltered(string fsRoot, string outDir, string base, string ext,
CreateOptions co, FilterOptions fo, out OperationStats stats) @safeCreates an archive with file filtering support.ArchiveHandle createArchiveFiltered(string fsRoot, string outDir, string base, string ext,
CreateOptions co, FilterOptions fo) @safeCreates an archive with file filtering support (no stats).OperationStats populateStats(ref const dar_operation_stats raw) @safe @nogc nothrowHelper to convert C struct to D structArchiveHandle isolateArchive(const ArchiveHandle h, string outDir) @safeIsolates a subset of an archive to an output directory and returns a new handle. Placeholder creates a marker file and returns a new handle.ArchiveHandle isolateArchive(const ArchiveHandle h, string outDir, IsolateOptions io) @safeIsolates an archive using custom IsolateOptions. Creates a new archive under `outDir` with basename "isolated" and same extension as source.ArchiveHandle repairArchive(string path, string base, string ext) @safeRepairs an archive and returns a new handle. Placeholder creates a marker file.ArchiveHandle repairArchive(string path, string base, string ext, RepairOptions ropts) @safeRepairs an archive using custom RepairOptions. Creates a repaired archive under the same path with basename "base_repaired".ArchiveHandle createArchive(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safeCreates an archive (full backup) writing slices to the given output directory.ArchiveHandle createArchiveIncremental(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safeCreates an incremental (differential) archive. Placeholder marks archive with an extra file.ArchiveHandle mergeArchives(const ArchiveHandle base, const ArchiveHandle diff, string outDir, string mergedBase, string ext) @safeMerges a base archive with a differential (incremental) archive into a new merged archive.ArchiveHandle mergeArchives(const ArchiveHandle base,
const ArchiveHandle diff,
string outDir,
string mergedBase,
string ext,
MergeOptions mo) @safeMerges two archives using custom MergeOptions.ArchiveHandle createArchiveIncremental(string fsRoot,
string outDir,
string base,
string ext,
CreateOptions co,
IncrementalOptions io) @safeCreates an incremental or differential archive using custom IncrementalOptions.XformHandle xformFromPath(string path, string base, string ext, uint minDigits = 0, string execute = null) @safeCreates an xform from path/base/ext source.void xformToDir(XformHandle xf,
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) @safeRuns the transform to a directory, possibly producing multiple slices.void xformToFd(XformHandle xf, int fd, string execute = null) @safeRuns the transform to a file descriptor.DatabaseHandle loadDatabase(string filename) @safeLoads a database from a dumped file (shim placeholder format).void dumpDatabase(const DatabaseHandle db, string filename) @safeDumps the database to a file (shim placeholder).void addArchiveToDatabase(DatabaseHandle db, string path, string base, string ext) @safeAdds an archive reference to the database.void removeRangeFromDatabase(DatabaseHandle db, uint minIndex, uint maxIndex) @safeRemoves archives by index range [minIndex, maxIndex] inclusive (0-based).void listDatabase(const DatabaseHandle db, scope void delegate(DbEntry) @safe cb) @safeLists archives stored in the database, invoking the provided callback for each entry.