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 errors
  • DarMemoryException — Out of memory
  • DarRangeException — Range/bounds errors
  • DarFeatureException — Feature not available
  • DarDataException — Data corruption
  • DarSystemException — System/IO errors

See Also

License

BSD-3-Clause
fn addArchiveToDatabase cancelClear cancelIsAvailable cancelStatus cancelThread createArchive createArchiveFiltered createArchiveIncremental createArchiveWithStats createEmptyDatabase dar_archive_create_full dar_archive_create_full_filtered dar_archive_create_full_with_stats dar_archive_create_incremental dar_archive_create_incremental_with_opts dar_archive_destroy dar_archive_diff dar_archive_diff_ex dar_archive_extract dar_archive_extract_with_opts dar_archive_extract_with_opts_and_stats dar_archive_extract_with_stats dar_archive_get_children dar_archive_get_summary dar_archive_isolate dar_archive_isolate_with_opts dar_archive_list dar_archive_merge dar_archive_merge_with_opts dar_archive_open_read dar_archive_repair dar_archive_repair_with_opts dar_archive_summary_clear dar_archive_test dar_archive_test_with_opts dar_archive_test_with_stats dar_cancel_clear dar_cancel_is_available dar_cancel_status dar_cancel_thread dar_create_opts_add_backup_hook_file dar_create_opts_clear_backup_hook_files dar_create_opts_clear_password dar_create_opts_create dar_create_opts_destroy dar_create_opts_get_allow_overwrite dar_create_opts_get_backup_hook_execute dar_create_opts_get_compression dar_create_opts_get_compression_block_size dar_create_opts_get_compression_level dar_create_opts_get_crypto_algo dar_create_opts_get_crypto_size dar_create_opts_get_delta_diff dar_create_opts_get_delta_sig_min_size dar_create_opts_get_delta_signature dar_create_opts_get_execute dar_create_opts_get_first_slice_size dar_create_opts_get_hash_algo dar_create_opts_get_progress_ctx dar_create_opts_get_remote dar_create_opts_get_sequential_marks dar_create_opts_get_sig_block_len dar_create_opts_get_slice_group dar_create_opts_get_slice_perm dar_create_opts_get_slice_size dar_create_opts_get_slice_user dar_create_opts_get_tape_marks dar_create_opts_get_user_comment dar_create_opts_get_warn_overwrite dar_create_opts_password_len dar_create_opts_set_allow_overwrite dar_create_opts_set_backup_hook_execute dar_create_opts_set_compression dar_create_opts_set_compression_block_size dar_create_opts_set_compression_level dar_create_opts_set_crypto_algo dar_create_opts_set_crypto_size dar_create_opts_set_delta_diff dar_create_opts_set_delta_sig_min_size dar_create_opts_set_delta_signature dar_create_opts_set_execute dar_create_opts_set_first_slice_size dar_create_opts_set_hash_algo dar_create_opts_set_password dar_create_opts_set_progress_cb dar_create_opts_set_remote dar_create_opts_set_sequential_marks dar_create_opts_set_sig_block_len dar_create_opts_set_slice_group dar_create_opts_set_slice_perm dar_create_opts_set_slice_size dar_create_opts_set_slice_user dar_create_opts_set_tape_marks dar_create_opts_set_user_comment dar_create_opts_set_user_interaction dar_create_opts_set_warn_overwrite dar_database_add_archive dar_database_create_empty dar_database_destroy dar_database_dump dar_database_list dar_database_load dar_database_remove_range dar_diff_opts_create dar_diff_opts_destroy dar_diff_opts_get_compare_data dar_diff_opts_get_compare_ea dar_diff_opts_get_compare_fsa dar_diff_opts_get_compare_metadata dar_diff_opts_set_compare_data dar_diff_opts_set_compare_ea dar_diff_opts_set_compare_fsa dar_diff_opts_set_compare_metadata dar_extract_opts_create dar_extract_opts_destroy dar_extract_opts_get_compare_fields dar_extract_opts_get_dirty_behavior dar_extract_opts_get_display_skipped dar_extract_opts_get_display_treated dar_extract_opts_get_empty dar_extract_opts_get_empty_dir dar_extract_opts_get_flat dar_extract_opts_get_ignore_deleted dar_extract_opts_get_ignore_unix_sockets dar_extract_opts_get_in_place dar_extract_opts_get_info_details dar_extract_opts_get_only_deleted dar_extract_opts_get_overwrite_policy dar_extract_opts_get_warn_over dar_extract_opts_get_warn_remove_no_match dar_extract_opts_has_filter dar_extract_opts_set_compare_fields dar_extract_opts_set_dirty_behavior dar_extract_opts_set_display_skipped dar_extract_opts_set_display_treated dar_extract_opts_set_empty dar_extract_opts_set_empty_dir dar_extract_opts_set_filter dar_extract_opts_set_flat dar_extract_opts_set_ignore_deleted dar_extract_opts_set_ignore_unix_sockets dar_extract_opts_set_in_place dar_extract_opts_set_info_details dar_extract_opts_set_only_deleted dar_extract_opts_set_overwrite_policy dar_extract_opts_set_warn_over dar_extract_opts_set_warn_remove_no_match dar_feat_bits dar_feat_ftp_repository dar_feat_largefile dar_feat_libbz2 dar_feat_libgcrypt dar_feat_liblz4 dar_feat_librsync dar_feat_libthreadar_version dar_feat_libxz dar_feat_libz dar_feat_libzstd dar_feat_posix_fadvise dar_feat_remote_repository dar_feat_sftp_repository dar_feat_system_endian dar_feat_thread_safe dar_feat_thread_stack_size dar_filter_opts_add_ea_exclude dar_filter_opts_add_ea_include dar_filter_opts_add_exclude dar_filter_opts_add_exclude_path dar_filter_opts_add_include dar_filter_opts_add_include_path dar_filter_opts_create dar_filter_opts_destroy dar_filter_opts_get_case_sensitive dar_filter_opts_get_max_size dar_filter_opts_get_min_size dar_filter_opts_set_case_sensitive dar_filter_opts_set_max_size dar_filter_opts_set_min_size dar_free_string dar_get_thread_id dar_get_version_string dar_incr_opts_create dar_incr_opts_destroy dar_incr_opts_get_change_policy dar_incr_opts_get_mode dar_incr_opts_get_reference dar_incr_opts_get_snapshot dar_incr_opts_set_change_policy dar_incr_opts_set_mode dar_incr_opts_set_reference dar_incr_opts_set_snapshot dar_isolate_opts_create dar_isolate_opts_destroy dar_isolate_opts_get_allow_over dar_isolate_opts_get_compression dar_isolate_opts_get_compression_block_size dar_isolate_opts_get_compression_level dar_isolate_opts_get_info_details dar_isolate_opts_get_slicing dar_isolate_opts_get_warn_over dar_isolate_opts_set_allow_over dar_isolate_opts_set_compression dar_isolate_opts_set_compression_block_size dar_isolate_opts_set_compression_level dar_isolate_opts_set_info_details dar_isolate_opts_set_slicing dar_isolate_opts_set_warn_over dar_make_data_error dar_make_feature_error dar_make_generic_error dar_make_range_error dar_mask_add dar_mask_clear dar_mask_create_and dar_mask_create_bool dar_mask_create_exclude_dir dar_mask_create_not dar_mask_create_or dar_mask_create_regex dar_mask_create_same_path dar_mask_create_simple dar_mask_create_simple_path dar_mask_destroy dar_mask_dump dar_mask_get_type dar_mask_is_covered dar_mask_size dar_merge_opts_create dar_merge_opts_destroy dar_merge_opts_get_compression dar_merge_opts_get_compression_block_size dar_merge_opts_get_compression_level dar_merge_opts_get_overwrite_policy dar_merge_opts_get_slicing dar_merge_opts_has_filter dar_merge_opts_set_compression dar_merge_opts_set_compression_block_size dar_merge_opts_set_compression_level dar_merge_opts_set_filter dar_merge_opts_set_overwrite_policy dar_merge_opts_set_slicing dar_ok dar_operation_stats_init dar_read_opts_clear_password dar_read_opts_create dar_read_opts_destroy dar_read_opts_get_crypto_algo dar_read_opts_get_crypto_size dar_read_opts_get_extension dar_read_opts_get_min_digits dar_read_opts_get_remote dar_read_opts_get_sequential_read dar_read_opts_password_len dar_read_opts_set_crypto_algo dar_read_opts_set_crypto_size dar_read_opts_set_extension dar_read_opts_set_min_digits dar_read_opts_set_password dar_read_opts_set_remote dar_read_opts_set_sequential_read dar_read_opts_set_user_interaction dar_repair_opts_create dar_repair_opts_destroy dar_repair_opts_get_overwrite_policy dar_repair_opts_get_slice_group dar_repair_opts_get_slice_perm dar_repair_opts_get_slice_user dar_repair_opts_get_slicing dar_repair_opts_set_overwrite_policy dar_repair_opts_set_slice_group dar_repair_opts_set_slice_perm dar_repair_opts_set_slice_user dar_repair_opts_set_slicing dar_slave_create dar_slave_create_from_fds dar_slave_destroy dar_slave_run dar_test_opts_add_include dar_test_opts_create dar_test_opts_destroy dar_test_opts_get_compare_data dar_test_opts_get_compare_ea dar_test_opts_get_compare_fsa dar_test_opts_get_display_treated dar_test_opts_get_include_at dar_test_opts_get_info_details dar_test_opts_include_count dar_test_opts_set_compare_data dar_test_opts_set_compare_ea dar_test_opts_set_compare_fsa dar_test_opts_set_display_treated dar_test_opts_set_info_details dar_user_interaction_create dar_user_interaction_create_blind dar_user_interaction_destroy dar_xform_create_from_fd dar_xform_create_from_path dar_xform_create_from_pipe dar_xform_destroy dar_xform_to_dir dar_xform_to_fd darVersion ddn_dar_shim_probe diffArchives dumpDatabase extractArchive extractArchiveWithStats featureBits featureFtpRepository featureLargefile featureLibBz2 featureLibgcrypt featureLibLz4 featureLibrsync featureLibthreadarVersion featureLibXz featureLibZ featureLibZstd featurePosixFadvise featureRemoteRepository featureSftpRepository featureSystemEndian featureThreadSafe featureThreadStackSize getArchiveSummary getThreadId isolateArchive isShimLinked listArchive listChildren listDatabase loadDatabase makeException mergeArchives openArchiveRead populateStats removeRangeFromDatabase repairArchive testArchive testArchiveWithStats throwOnError xformFromFd xformFromPath xformFromPipe xformToDir xformToFd

Types 85

enumDarCompression : int

Compression algorithm enum (mirrors libdar::compression).

NONE = 0
GZIP = 1
BZIP2 = 2
LZO = 3
XZ = 4
ZSTD = 5
LZ4 = 6
LZO1X_1_15 = 7
LZO1X_1 = 8
enumDarHashAlgo : int

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.

NONE = 0No hash file generated
MD5 = 1MD5 sidecar file (basename.1.ext.md5)
SHA1 = 2SHA-1 sidecar file (basename.1.ext.sha1)
SHA256 = 3SHA-256 sidecar file (basename.1.ext.sha256)
SHA512 = 4SHA-512 sidecar file (basename.1.ext.sha512)
enumDarCryptoAlgo : int

Crypto algorithm enum (mirrors libdar::crypto_algo).

Used to specify the encryption algorithm for archive creation and reading.

NONE = 0No encryption
SCRAMBLING = 1Weak scrambling (not recommended)
BLOWFISH = 2Blowfish encryption
AES256 = 3AES-256 strong encryption
TWOFISH256 = 4Twofish-256 encryption
SERPENT256 = 5Serpent-256 encryption
CAMELLIA256 = 6Camellia-256 encryption
structdar_list_entry

Low-level list entry structure matching the C shim's dar_list_entry. Extended with ownership, timestamps, compression, and attribute flags.

Fields
char * name
uint type
ulong size
ulong uid
ulong gid
uint perm
long last_access
long last_modif
long last_change
int compression_algo
int is_hard_linked
int has_ea
int has_fsa
int is_sparse
int is_dirty
const(char) * symlink_target
ulong major_device
ulong minor_device
aliasdar_list_cb = void function(const char * path, const dar_list_entry * ent, void * ctx)
structdar_err
Fields
int code
char * msg
aliasdar_archive = void
aliasdar_read_opts = void
aliasdar_create_opts = void

Function type for calculating signature block length based on file size.

FIXED = 0block size is independent from file size
LINEAR = 1block size is proportional to file size
LOG2 = 2block size is proportional to log2(file size)
ROOT2 = 3block size is proportional to sqrt(file size)
ROOT3 = 4block size is proportional to cube root of file size
aliasdar_message_cb = void function(const char * message, void * ctx) nothrow

Callback type for warning/info messages from libdar.

aliasdar_treated_cb = void function(const char * path, void * ctx) nothrow

Callback type for file treatment progress (file being processed).

aliasdar_ui_message_cb = void function(const char * message, void * ctx) nothrow

Callback type for displaying messages (user_interaction version, non-@nogc).

Parameters

messagethe message to display (UTF-8)
ctxuser-provided context pointer
aliasdar_pause_cb = int function(const char * message, void * ctx) nothrow

Callback type for yes/no questions (pause).

Parameters

messagethe question to ask (UTF-8)
ctxuser-provided context pointer

Returns

1 for yes/true, 0 for no/false
aliasdar_get_string_cb = char * function(const char * message, int echo, void * ctx) nothrow

Callback type to get a string answer from the user.

Parameters

messagethe prompt to display (UTF-8)
echo1 if input should be visible, 0 for hidden (password-style)
ctxuser-provided context pointer

Returns

newly allocated string (caller must free with dar_free_string), or null on error/cancel
aliasdar_get_secu_string_cb = char * function(const char * message, int echo, void * ctx) nothrow

Callback type to get a secure string answer from the user (for passwords/secrets).

Parameters

messagethe prompt to display (UTF-8)
echo1 if input should be visible, 0 for hidden (password-style)
ctxuser-provided context pointer

Returns

newly allocated string (caller must free with dar_free_string), or null on error/cancel

Note

The returned string should be securely wiped after use.
aliasdar_user_interaction = void

Opaque user interaction handle for full libdar user_interaction support.

aliasdar_extract_opts = void
structdar_diff_result
Fields
uint different
ulong files_compared
structdar_test_result
Fields
ulong files_checked
ulong errors
aliasdar_test_opts = void
aliasdar_repair_opts = void
aliasdar_diff_opts = void
aliasdar_diff_cb = void function(int kind, const char * path, void * ctx) nothrow
structdar_diff_result_ex
Fields
uint different
ulong files_compared
ulong added
ulong removed
ulong changed
aliasdar_incr_opts = void
aliasdar_merge_opts = void
structdar_archive_summary
Fields
ulong slice_size
ulong first_slice_size
ulong slice_number
ulong archive_size
ulong catalog_size
ulong data_size
ulong storage_size
char * compression_algo
char * cipher
char * asym
char * user_comment
char * edition
int is_signed
int has_tape_marks
structdar_operation_stats
Fields
ulong treated
ulong hard_links
ulong skipped
ulong inode_only
ulong ignored
ulong tooold
ulong errored
ulong deleted
ulong ea_treated
ulong fsa_treated
ulong byte_amount
aliasdar_isolate_opts = void
aliasdar_filter_opts = void
aliasdar_xform = void
aliasdar_database = void
aliasdar_db_list_cb = void function(const char * path, const char * base, const char * ext, void * ctx)
aliasdar_slave = void
aliasdar_mask = void

Mask types corresponding to libdar mask classes.

BOOL = 0bool_mask: constant true/false
SIMPLE = 1simple_mask: glob patterns
REGEX = 2regular_mask: POSIX regex
NOT = 3not_mask: negation
AND = 4et_mask: AND combination
OR = 5ou_mask: OR combination
SIMPLE_PATH = 6simplepathmask: subdir matching
SAME_PATH = 7samepathmask: exact path
EXCLUDE_DIR = 8excludedirmask: directory exclusion

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.

Fields
private ubyte * _p
private size_t _len
Methods
SecurePassword 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).
size_t length() @property const @safe @nogc nothrowLength in bytes of the password.
void wipe() @trusted @nogc nothrowOverwrite the memory with zeros (keeps allocation).
void dispose() @trusted @nogc nothrowWipe and free the memory; object becomes empty.
Destructors
enumDarErrorCode : int

Canonical error codes returned by the shim functions.

Values mirror common conditions and map to specific libdar exception types. Zero means success.

DAR_OK = 0Success (no error)
DAR_E_GENERIC = 1Generic/unknown error (Egeneric catchall)
DAR_E_ARGUMENT = 2Invalid argument (null pointer, etc.)
DAR_E_IO = 5I/O error
DAR_E_IO_WRITE = 6I/O write error
DAR_E_MEMORY = 12Out of memory (Ememory)
DAR_E_STATE = 30Invalid state/handle
DAR_E_RANGE = 40Range error (Erange)
DAR_E_FEATURE = 41Feature not available (Efeature)
DAR_E_HARDWARE = 42Hardware error (Ehardware)
DAR_E_USER_ABORT = 43User abort (Euser_abort)
DAR_E_DATA = 44Data error/corruption (Edata)
DAR_E_COMPILATION = 45Compilation/build mismatch (Ecompilation)
DAR_E_SYSTEM = 46System error (Esystem)
DAR_E_NET_AUTH = 47Network authentication error (Enet_auth)
DAR_E_BUG = 48Internal bug (Ebug)
DAR_E_THREAD_CANCEL = 49Thread cancellation (Ethread_cancel)
DAR_E_INFININT = 50Infinint arithmetic error (Einfinint)
DAR_E_LIMITINT = 51Limited integer overflow (Elimitint)
DAR_E_SCRIPT = 52Script execution error (Escript)
classDarException : Exception

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.

Fields
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).
Constructors
this(string msg, int code)

Base class for argument-related errors (invalid/null parameters).

Constructors
this(string msg)

Invalid state or handle misuse.

Constructors
this(string msg)

Generic catch-all error.

Constructors
this(string msg)

I/O related error (open/create/write failures).

Constructors
this(string msg, int code = DarErrorCode.DAR_E_IO)

Out-of-memory condition reported by libdar (Ememory).

Constructors
this(string msg)

Range error (Erange) — value out of expected range.

Constructors
this(string msg)

Feature not available (Efeature) — requested feature not compiled in or supported.

Constructors
this(string msg)

Hardware error (Ehardware) — disk or device failure.

Constructors
this(string msg)

User abort (Euser_abort) — operation cancelled by user.

Constructors
this(string msg)

Data error (Edata) — data corruption or integrity failure.

Constructors
this(string msg)

Compilation mismatch (Ecompilation) — library/application version incompatibility.

Constructors
this(string msg)

System error (Esystem) — OS-level error.

Constructors
this(string msg)

Network authentication error (Enet_auth) — remote authentication failure.

Constructors
this(string msg)

Internal bug (Ebug) — should not happen, indicates a bug in libdar.

Constructors
this(string msg)

Thread cancellation (Ethread_cancel) — operation cancelled due to thread termination.

Constructors
this(string msg)

Infinint arithmetic error (Einfinint) — arbitrary precision integer error.

Constructors
this(string msg)

Limited integer overflow (Elimitint) — integer overflow in limited precision mode.

Constructors
this(string msg)

Script execution error (Escript) — error executing user script/hook.

Constructors
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.

Fields
private dar_archive * _ptr
private string _path
private string _base
private string _ext
Methods
bool 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).
string base() @property const @safe @nogc nothrowArchive base (may be empty if unknown).
string ext() @property const @safe @nogc nothrowArchive extension (may be empty if unknown).
Constructors
this(dar_archive * p)
this(dar_archive * p, string path, string base, string ext)Construct with archive coordinates (path/base/ext).
Destructors
~thisDestroyer: releases the underlying handle if present.
enumEntryType : uint

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)
UNKNOWN = 0Unknown or unrecognized entry type
FILE = 1Regular file
DIR = 2Directory
SYMLINK = 3Symbolic link
CHAR_DEVICE = 4Character device (e.g., /dev/tty)
BLOCK_DEVICE = 5Block device (e.g., /dev/sda)
UNIX_SOCKET = 6Unix domain socket
NAMED_PIPE = 7Named pipe (FIFO)
DOOR = 8Door (Solaris-specific IPC mechanism)
REMOVED = 9Removed entry marker (used in incremental archives)
structListEntry

D-side list entry used by callbacks and helpers.

Extended with ownership, timestamps, compression, and attribute flags.

Fields
string name
ulong size
ulong uid
ulong gid
uint perm
long lastAccess
long lastModif
long lastChange
DarCompression compressionAlgo
bool isHardLinked
bool hasEA
bool hasFSA
bool isSparse
bool isDirty
string 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.

Fields
uint different0 means identical per shim heuristic; 1 means different.
ulong filesComparedNumber of files compared (placeholder value in shim).

Enhanced diff result counters.

Fields
uint different
ulong filesCompared
ulong added
ulong removed
ulong changed
enumDarChangePolicy : int

Change detection policy for incremental backups.

DATE = 0
HASH = 1
enumDarIncrMode : int

Incremental backup mode.

INCREMENTAL = 0
DIFFERENTIAL = 1
DECREMENTAL = 2

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.

Fields
private dar_incr_opts * _p
Methods
IncrementalOptions create() @safeFactory: allocate a new IncrementalOptions object.
void 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).
DarChangePolicy getChangePolicy() @safeGets the change detection policy.
void setSnapshot(string filename) @safeSets the snapshot file path (empty disables snapshots).
string getSnapshot() @safeGets the snapshot file path (may be empty).
void setMode(DarIncrMode mode) @safeSets the incremental mode: INCREMENTAL, DIFFERENTIAL, or DECREMENTAL.
DarIncrMode getMode() @safeGets the current incremental mode.
const(dar_incr_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_incr_opts * p)
Destructors
~thisDestructor releases the underlying options.
enumDiffKind : int

Diff difference kinds

ADDED = DAR_DIFF_ADDED
REMOVED = DAR_DIFF_REMOVED
CHANGED = DAR_DIFF_CHANGED

Result of testing (verifying) an archive.

Fields
ulong filesChecked
ulong errors

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

Fields
private dar_test_opts * _p
Methods
TestOptions create() @safeFactory: allocate a new TestOptions object.
void setCompareData(bool v) @safeEnable/disable data comparison (default: enabled).
bool getCompareData() @safeReturns true if data comparison is enabled.
void setCompareEA(bool v) @safeEnable/disable extended attributes comparison (default: disabled).
bool getCompareEA() @safeReturns true if EA comparison is enabled.
void setCompareFSA(bool v) @safeEnable/disable filesystem-specific attributes comparison (default: disabled).
bool getCompareFSA() @safeReturns true if FSA comparison is enabled.
void setInfoDetails(bool v) @safeEnable/disable detailed info display (default: disabled).
bool getInfoDetails() @safeReturns true if detailed info display is enabled.
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.
uint includeCount() @safe @nogc nothrowNumber of include patterns currently set.
string includeAt(uint idx) @safeReturns include pattern at index for testing/verification.
const(dar_test_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_test_opts * p)
Destructors
~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().

Fields
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.

Fields
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.

Fields
private dar_merge_opts * _p
Methods
MergeOptions create() @safeFactory: allocate a new merge options object.
void setOverwritePolicy(int policy) @safe
int getOverwritePolicy() @safe
void setSlicing(ulong sliceSize, ulong firstSliceSize = 0) @safe
void getSlicing(out ulong sliceSize, out ulong firstSliceSize) @safe
void setCompressionLevel(uint level) @safe
uint getCompressionLevel() @safe
void setCompressionBlockSize(uint size) @safe
void setFilter(FilterOptions fo) @safe
bool hasFilter() @safe
const(dar_merge_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_merge_opts * p)
Destructors
~thisDestructor releases the underlying options.
structDbEntry

Represents an entry in the database listing.

Fields
string path
string base
string ext

Opaque database handle with destructor calling the shim destroy function.

Fields
private dar_database * _p
Methods
bool isValid() @property const @safe @nogc nothrow
Constructors
this(dar_database * p)
Destructors

RAII wrapper around xform handle.

Fields
private dar_xform * _p
Methods
bool isValid() @property const @safe @nogc nothrow
Constructors
this(dar_xform * p)
Destructors

ReadOptions RAII wrapper for minimal read options in the shim.

Fields
private dar_read_opts * _p
Methods
ReadOptions create() @safeFactory: allocate a new options object.
void setExtension(string ext) @safeSets the slice extension (usually "dar").
string getExtension() @safeGets the slice extension string.
void setMinDigits(uint v) @safeSets minimum digits for slice numbering.
uint getMinDigits() @safeGets minimum digits for slice numbering.
void setCryptoAlgo(DarCryptoAlgo algo) @safeSets the crypto algorithm for archive decryption.
DarCryptoAlgo getCryptoAlgo() @safeGets the crypto algorithm.
void setCryptoSize(uint size) @safeSets the crypto key size in bits.
uint getCryptoSize() @safeGets the crypto key size.
void setPassword(ref const(SecurePassword) pw) @safeSets the decryption password from a secure container.
void setPassword(string pw) @safeConvenience: sets the password from a D string (copied and wiped).
void clearPassword() @safeClears the stored password from options (zeroizes within the shim).
ulong passwordLenForTest() @safe @nogc nothrowTest helper: returns current password length as seen by the shim.
void setRemoteUrl(string url) @safeSets a remote repository URL (placeholder, stored in options).
string getRemoteUrl() @safeGets the remote repository URL (may be empty).
void setSequentialRead(bool val) @safeEnables or disables sequential read mode.
bool getSequentialRead() @safeGets the sequential read mode setting.
Constructors
this(dar_read_opts * p)
Destructors
~thisDestructor releases the underlying options.

DiffOptions RAII wrapper controlling comparison behavior.

Fields
private dar_diff_opts * _p
Methods
void setCompareData(bool v) @safe
void setCompareMetadata(bool v) @safe
void setCompareEA(bool v) @safe
void setCompareFSA(bool v) @safe
bool getCompareData() @safe
bool getCompareMetadata() @safe
bool getCompareEA() @safe
bool getCompareFSA() @safe
const(dar_diff_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_diff_opts * p)
Destructors

ExtractOptions RAII wrapper mapping to libdar::archive_options_extract.

Fields
private dar_extract_opts * _p
Methods
void setOverwritePolicy(int policy) @safe
int getOverwritePolicy() @safe
void setFlat(bool flat) @safe
bool getFlat() @safe
void setWarnOverwrite(bool v) @safe
bool getWarnOverwrite() @safe
void setInfoDetails(bool v) @safe
bool getInfoDetails() @safe
void setDisplayTreated(bool display, bool onlyDir = false) @safe
void getDisplayTreated(out bool display, out bool onlyDir) @safe
void setDisplaySkipped(bool v) @safe
bool getDisplaySkipped() @safe
void setCompareFields(int cf) @safe
int getCompareFields() @safe
void setDirtyBehavior(int db) @safe
int getDirtyBehavior() @safe
void setWarnRemoveNoMatch(bool v) @safe
void setEmpty(bool v) @safe
bool getEmpty() @safe
void setEmptyDir(bool v) @safe
bool getEmptyDir() @safe
void setOnlyDeleted(bool v) @safe
bool getOnlyDeleted() @safe
void setIgnoreDeleted(bool v) @safe
bool getIgnoreDeleted() @safe
void setIgnoreUnixSockets(bool v) @safe
void setInPlace(bool v) @safe
bool getInPlace() @safe
void setFilter(FilterOptions fo) @safeSets a filter for selective extraction.
bool hasFilter() @safeReturns true if a filter is currently set for selective extraction.
const(dar_extract_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_extract_opts * p)
Destructors

IsolateOptions RAII wrapper mapping to libdar::archive_options_isolate.

Fields
private dar_isolate_opts * _p
Methods
void setAllowOverwrite(bool v) @safe
bool getAllowOverwrite() @safe
void setWarnOverwrite(bool v) @safe
bool getWarnOverwrite() @safe
void setInfoDetails(bool v) @safe
bool getInfoDetails() @safe
void setCompressionLevel(uint level) @safe
uint getCompressionLevel() @safe
void setCompressionBlockSize(uint size) @safe
void setSlicing(ulong sliceSize, ulong firstSliceSize = 0) @safe
void getSlicing(out ulong sliceSize, out ulong firstSliceSize) @safe
const(dar_isolate_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_isolate_opts * p)
Destructors

RepairOptions RAII wrapper mapping to repair options for xform-based repair. Supports overwrite policy, slicing parameters, slice permission and ownership.

Fields
private dar_repair_opts * _p
Methods
RepairOptions create() @safeFactory: allocate a new repair options object.
void setOverwritePolicy(int policy) @safe
int getOverwritePolicy() @safe
void setSlicing(ulong sliceSize, ulong firstSliceSize = 0) @safe
void getSlicing(out ulong sliceSize, out ulong firstSliceSize) @safe
void setSlicePerm(string perm) @safe
string getSlicePerm() @safe
void setSliceUser(string user) @safe
string getSliceUser() @safe
void setSliceGroup(string group) @safe
string getSliceGroup() @safe
const(dar_repair_opts) * ptr() @property const @safe @nogc nothrow
Constructors
this(dar_repair_opts * p)
Destructors
~thisDestructor releases the underlying options.

CreateOptions RAII wrapper for minimal create options in the shim.

Fields
private dar_create_opts * _p
Methods
CreateOptions create() @safeFactory: allocate a new options object.
void setSliceSize(ulong v) @safeSets base slice size; 0 disables slicing.
ulong getSliceSize() @safeGets base slice size.
void setFirstSliceSize(ulong v) @safeSets first slice size; 0 uses base slice size.
ulong getFirstSliceSize() @safeGets first slice size.
void setAllowOverwrite(bool v) @safeSets whether overwriting slices is allowed.
bool getAllowOverwrite() @safeGets allow-overwrite flag.
void setWarnOverwrite(bool v) @safeSets whether to warn before overwriting slices.
bool getWarnOverwrite() @safeGets warn-overwrite flag.
void setSlicePerm(string perm) @safeSets slice permission string like "0644" or empty string to use umask.
string getSlicePerm() @safeGets slice permission string (may be empty).
void setTapeMarks(bool on) @safeEnables or disables tape marks (sequential marks) in the created archive.
bool getTapeMarks() @safeReturns true if tape marks are enabled for archive creation.
void setUserComment(string comment) @safeSets the archive user comment to be stored in archive metadata.
string getUserComment() @safeGets the currently configured user comment (may be empty).
void setSliceUser(string user) @safeSets slice user ownership (username or UID string). Empty string uses default.
string getSliceUser() @safeGets slice user ownership string (may be empty).
void setSliceGroup(string group) @safeSets slice group ownership (group name or GID string). Empty string uses default.
string getSliceGroup() @safeGets slice group ownership string (may be empty).
void setExecute(string cmd) @safeSets the execute hook command for slice completion.
string getExecute() @safeGets the execute hook command string.
void setCompression(DarCompression algo) @safeSets the compression algorithm.
DarCompression getCompression() @safeGets the compression algorithm.
void setCompressionLevel(uint level) @safeSets the compression level (1-9).
uint getCompressionLevel() @safeGets the compression level.
void setCompressionBlockSize(uint blockSize) @safeSets the compression block size for parallel compression.
uint getCompressionBlockSize() @safeGets the compression block size.
void setHashAlgo(DarHashAlgo algo) @safeSets the hash/checksum algorithm for sidecar file generation.
DarHashAlgo getHashAlgo() @safeGets the currently configured hash/checksum algorithm.
void setCryptoAlgo(DarCryptoAlgo algo) @safeSets the crypto algorithm for archive encryption.
DarCryptoAlgo getCryptoAlgo() @safeGets the crypto algorithm.
void setCryptoSize(uint size) @safeSets the crypto key size in bits.
uint getCryptoSize() @safeGets the crypto key size.
void setPassword(ref const(SecurePassword) pw) @safeSets the encryption password from a secure container.
void setPassword(string pw) @safeConvenience: sets the password from a D string (copied and wiped).
void clearPassword() @safeClears the stored password from options (zeroizes within the shim).
ulong passwordLenForTest() @safe @nogc nothrowTest helper: returns current password length as seen by the shim.
void setRemoteUrl(string url) @safeSets a remote repository URL (placeholder, stored in options).
string getRemoteUrl() @safeGets the remote repository URL (may be empty).
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.
bool getSequentialMarks() @safeGets the sequential marks setting.
void setBackupHookExecute(string execute) @safeSets the backup hook execute command.
string getBackupHookExecute() @safeGets the backup hook execute command.
void addBackupHookFile(string pattern) @safeAdds a file pattern to the backup hook mask.
void clearBackupHookFiles() @safeClears all backup hook file patterns.
void setDeltaSignature(bool val) @safeEnables or disables storing delta signatures for future incremental backups.
bool getDeltaSignature() @safe @nogc nothrowGets the delta signature setting.
void setDeltaDiff(bool val) @safeEnables or disables computing binary delta using reference archive signatures.
bool getDeltaDiff() @safe @nogc nothrowGets the delta diff setting.
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.
Constructors
this(dar_create_opts * p)
Destructors
~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);

Fields
private dar_filter_opts * _p
Methods
FilterOptions create() @safeFactory: allocate a new filter options object with default settings (no filtering).
void addInclude(string pattern) @safeAdds a filename include pattern (glob-style).
void addExclude(string pattern) @safeAdds a filename exclude pattern (glob-style).
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).
void setMinSize(ulong minSize) @safeSets minimum file size filter.
ulong getMinSize() @safeGets the minimum file size filter (0 if disabled).
void setMaxSize(ulong maxSize) @safeSets maximum file size filter.
ulong getMaxSize() @safeGets the maximum file size filter (0 if disabled).
void setCaseSensitive(bool caseSensitive) @safeSets whether pattern matching is case-sensitive.
bool getCaseSensitive() @safeGets the case sensitivity setting.
const(dar_filter_opts) * ptr() @property const @safe @nogc nothrowReturns the underlying C pointer (for use with shim functions).
Constructors
this(dar_filter_opts * p)
Destructors
~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();

Fields
private dar_slave * _p
Methods
DarSlave 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.
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.
dar_slave * ptr() @property @safe @nogc nothrowReturns the underlying C pointer (for advanced use).
Constructors
this(dar_slave * p)
Destructors
~thisDestructor releases the underlying slave handle.
classMask

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 false
  • simple_mask — glob patterns (shell wildcards like *.txt)
  • regular_mask — POSIX regular expressions
  • not_mask — negation of another mask
  • et_mask — AND combination of multiple masks
  • ou_mask — OR combination of multiple masks
  • simple_path_mask — path-based matching (subdir relationships)
  • same_path_mask — exact path matching
  • exclude_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"));

Fields
private dar_mask * _p
Methods
Mask boolean(bool value) @safeCreates a boolean mask that always returns the same value.
Mask glob(string pattern, bool caseSensitive = true) @safeCreates a glob pattern mask (shell-style wildcards).
Mask regex(string pattern, bool caseSensitive = true) @safeCreates a POSIX regular expression mask.
Mask notMask(Mask inner) @safeCreates a negation mask that inverts another mask's result.
Mask andMask() @safeCreates an AND combination mask (initially empty).
Mask orMask() @safeCreates an OR combination mask (initially empty).
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).
bool isCovered(string expression) @safeTests if a string is covered (matched) by this mask.
void add(Mask toAdd) @safeAdds a mask to this AND or OR combination.
void clear() @safeClears all masks from this AND or OR combination.
uint size() @safe @nogc nothrowReturns the number of masks in this AND or OR combination.
DarMaskType maskType() @safe @nogc nothrowReturns the type of this mask.
string dump() @safeReturns a human-readable description of the mask structure.
bool isValid() @property const @safe @nogc nothrowReturns true if the mask handle is valid.
dar_mask * ptr() @property @safe @nogc nothrowReturns the underlying C pointer (for advanced use).
Constructors
this(dar_mask * p)
Destructors

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 messages
  • pause — ask yes/no questions
  • getString — prompt for arbitrary string input
  • getSecuString — 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);

Fields
private dar_user_interaction * _p
Methods
UserInteractionHandle 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).
bool isValid() @property const @safe @nogc nothrowReturns true if the handle is valid.
dar_user_interaction * ptr() @property @safe @nogc nothrowReturns the underlying C pointer (for use with shim functions).
Constructors
this(dar_user_interaction * p)
Destructors
~thisDestructor releases the underlying handle.

Functions 359

fnconst(char) * dar_get_version_string()
fnvoid dar_free_string(const char * s)
fndar_err dar_ok()
fndar_err dar_archive_destroy(dar_archive * h)
fndar_err dar_read_opts_create(dar_read_opts * * outPtr)
fndar_err dar_read_opts_destroy(dar_read_opts * o)
fndar_err dar_read_opts_set_extension(dar_read_opts * o, const char * ext)
fndar_err dar_read_opts_get_extension(const dar_read_opts * o, const char * * out_ext)
fndar_err dar_read_opts_set_min_digits(dar_read_opts * o, uint min_digits)
fndar_err dar_read_opts_get_min_digits(const dar_read_opts * o, uint * out_min_digits)
fndar_err dar_create_opts_create(dar_create_opts * * outPtr)
fndar_err dar_create_opts_destroy(dar_create_opts * o)
fndar_err dar_create_opts_set_slice_size(dar_create_opts * o, ulong slice_size)
fndar_err dar_create_opts_get_slice_size(const dar_create_opts * o, ulong * out_slice_size)
fndar_err dar_create_opts_set_first_slice_size(dar_create_opts * o, ulong first_slice_size)
fndar_err dar_create_opts_get_first_slice_size(const dar_create_opts * o, ulong * out_first_slice_size)
fndar_err dar_create_opts_set_allow_overwrite(dar_create_opts * o, int allow_overwrite)
fndar_err dar_create_opts_get_allow_overwrite(const dar_create_opts * o, int * out_allow_overwrite)
fndar_err dar_create_opts_set_warn_overwrite(dar_create_opts * o, int warn_overwrite)
fndar_err dar_create_opts_get_warn_overwrite(const dar_create_opts * o, int * out_warn_overwrite)
fndar_err dar_create_opts_set_slice_perm(dar_create_opts * o, const char * perm)
fndar_err dar_create_opts_get_slice_perm(const dar_create_opts * o, const char * * out_perm)
fndar_err dar_create_opts_set_tape_marks(dar_create_opts * o, int tape_marks)
fndar_err dar_create_opts_get_tape_marks(const dar_create_opts * o, int * out_tape_marks)
fndar_err dar_create_opts_set_user_comment(dar_create_opts * o, const char * comment)
fndar_err dar_create_opts_get_user_comment(const dar_create_opts * o, const char * * out_comment)
fndar_err dar_create_opts_set_slice_user(dar_create_opts * o, const char * user)
fndar_err dar_create_opts_get_slice_user(const dar_create_opts * o, const char * * out_user)
fndar_err dar_create_opts_set_slice_group(dar_create_opts * o, const char * group)
fndar_err dar_create_opts_get_slice_group(const dar_create_opts * o, const char * * out_group)
fndar_err dar_create_opts_set_execute(dar_create_opts * o, const char * cmd)
fndar_err dar_create_opts_get_execute(const dar_create_opts * o, const char * * out_cmd)
fndar_err dar_create_opts_set_compression(dar_create_opts * o, int algo)
fndar_err dar_create_opts_get_compression(const dar_create_opts * o, int * out_algo)
fndar_err dar_create_opts_set_compression_level(dar_create_opts * o, uint level)
fndar_err dar_create_opts_get_compression_level(const dar_create_opts * o, uint * out_level)
fndar_err dar_create_opts_set_compression_block_size(dar_create_opts * o, uint block_size)
fndar_err dar_create_opts_get_compression_block_size(const dar_create_opts * o, uint * out_block_size)
fndar_err dar_create_opts_set_hash_algo(dar_create_opts * o, int algo)
fndar_err dar_create_opts_get_hash_algo(const dar_create_opts * o, int * out_algo)
fndar_err dar_create_opts_set_crypto_algo(dar_create_opts * o, int algo)
fndar_err dar_create_opts_get_crypto_algo(const dar_create_opts * o, int * out_algo)
fndar_err dar_create_opts_set_crypto_size(dar_create_opts * o, uint size)
fndar_err dar_create_opts_get_crypto_size(const dar_create_opts * o, uint * out_size)
fndar_err dar_read_opts_set_crypto_algo(dar_read_opts * o, int algo)
fndar_err dar_read_opts_get_crypto_algo(const dar_read_opts * o, int * out_algo)
fndar_err dar_read_opts_set_crypto_size(dar_read_opts * o, uint size)
fndar_err dar_read_opts_get_crypto_size(const dar_read_opts * o, uint * out_size)
fndar_err dar_read_opts_set_password(dar_read_opts * o, const(ubyte) * pw, ulong pw_len)
fndar_err dar_read_opts_clear_password(dar_read_opts * o)
fndar_err dar_create_opts_set_password(dar_create_opts * o, const(ubyte) * pw, ulong pw_len)
fndar_err dar_create_opts_clear_password(dar_create_opts * o)
fnulong dar_read_opts_password_len(const(dar_read_opts) * o)
fnulong dar_create_opts_password_len(const(dar_create_opts) * o)
fndar_err dar_read_opts_set_remote(dar_read_opts * o, const char * url)
fndar_err dar_read_opts_get_remote(const(dar_read_opts) * o, const char * * out_url)
fndar_err dar_create_opts_set_remote(dar_create_opts * o, const char * url)
fndar_err dar_create_opts_get_remote(const(dar_create_opts) * o, const char * * out_url)
fndar_err dar_read_opts_set_sequential_read(dar_read_opts * o, int val)
fndar_err dar_read_opts_get_sequential_read(const(dar_read_opts) * o, int * out_val)
fndar_err dar_create_opts_set_sequential_marks(dar_create_opts * o, int val)
fndar_err dar_create_opts_get_sequential_marks(const(dar_create_opts) * o, int * out_val)
fndar_err dar_create_opts_set_backup_hook_execute(dar_create_opts * o, const char * execute)
fndar_err dar_create_opts_get_backup_hook_execute(const(dar_create_opts) * o, const char * * out_execute)
fndar_err dar_create_opts_add_backup_hook_file(dar_create_opts * o, const char * pattern)
fndar_err dar_create_opts_clear_backup_hook_files(dar_create_opts * o)
fndar_err dar_create_opts_set_delta_signature(dar_create_opts * o, int val)
fnint dar_create_opts_get_delta_signature(const(dar_create_opts) * o)
fndar_err dar_create_opts_set_delta_diff(dar_create_opts * o, int val)
fnint dar_create_opts_get_delta_diff(const(dar_create_opts) * o)
fndar_err dar_create_opts_set_delta_sig_min_size(dar_create_opts * o, ulong min_size)
fnulong dar_create_opts_get_delta_sig_min_size(const(dar_create_opts) * o)
fndar_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)
fnvoid 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)
fndar_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.
fnvoid * dar_create_opts_get_progress_ctx(const(dar_create_opts) * o)Get progress callback context from create options (for verification).
fndar_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.
fndar_err dar_user_interaction_create_blind(dar_user_interaction * * outPtr)Create a blind user interaction (no prompts, default answers).
fndar_err dar_user_interaction_destroy(dar_user_interaction * ui)Destroy a user interaction object. Safe to call with null.
fndar_err dar_read_opts_set_user_interaction(dar_read_opts * o, dar_user_interaction * ui)Set the user interaction on read options.
fndar_err dar_create_opts_set_user_interaction(dar_create_opts * o, dar_user_interaction * ui)Set the user interaction on create options.
fndar_err dar_extract_opts_create(dar_extract_opts * * outPtr)
fndar_err dar_extract_opts_destroy(dar_extract_opts * eo)
fndar_err dar_extract_opts_set_flat(dar_extract_opts * eo, int flat)
fndar_err dar_extract_opts_set_warn_over(dar_extract_opts * eo, int warn_over)
fndar_err dar_extract_opts_set_info_details(dar_extract_opts * eo, int info_details)
fndar_err dar_extract_opts_set_display_treated(dar_extract_opts * eo, int display_treated, int only_dir)
fndar_err dar_extract_opts_set_display_skipped(dar_extract_opts * eo, int display_skipped)
fndar_err dar_extract_opts_set_compare_fields(dar_extract_opts * eo, int compare_fields)
fndar_err dar_extract_opts_set_dirty_behavior(dar_extract_opts * eo, int dirty_behavior)
fndar_err dar_extract_opts_set_overwrite_policy(dar_extract_opts * eo, int policy)
fndar_err dar_extract_opts_set_warn_remove_no_match(dar_extract_opts * eo, int warn_remove_no_match)
fndar_err dar_extract_opts_set_empty(dar_extract_opts * eo, int empty)
fndar_err dar_extract_opts_set_empty_dir(dar_extract_opts * eo, int empty_dir)
fndar_err dar_extract_opts_set_only_deleted(dar_extract_opts * eo, int only_deleted)
fndar_err dar_extract_opts_set_ignore_deleted(dar_extract_opts * eo, int ignore_deleted)
fndar_err dar_extract_opts_set_ignore_unix_sockets(dar_extract_opts * eo, int ignore_unix_sockets)
fndar_err dar_extract_opts_set_in_place(dar_extract_opts * eo, int in_place)
fnint dar_extract_opts_get_flat(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_warn_over(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_info_details(const(dar_extract_opts) * eo)
fnvoid dar_extract_opts_get_display_treated(const(dar_extract_opts) * eo, int * display_treated, int * only_dir)
fnint dar_extract_opts_get_display_skipped(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_compare_fields(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_dirty_behavior(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_overwrite_policy(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_warn_remove_no_match(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_empty(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_empty_dir(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_only_deleted(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_ignore_deleted(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_ignore_unix_sockets(const(dar_extract_opts) * eo)
fnint dar_extract_opts_get_in_place(const(dar_extract_opts) * eo)
fndar_err dar_extract_opts_set_filter(dar_extract_opts * eo, const(dar_filter_opts) * fo)
fnint dar_extract_opts_has_filter(const(dar_extract_opts) * eo)
fndar_err dar_archive_extract_with_opts(const(dar_archive) * h, const char * out_dir, const(dar_extract_opts) * eo)
fndar_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)
fndar_err dar_archive_open_read(const char * path, const char * base, const char * ext, const(dar_read_opts) * ro, dar_archive * * outHandle)
fndar_err dar_archive_list(const(dar_archive) * h, dar_list_cb cb, void * ctx)
fndar_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)
fndar_err dar_archive_get_children(const(dar_archive) * h, const char * path, dar_list_cb cb, void * ctx)
fndar_err dar_archive_extract(const(dar_archive) * h, const char * out_dir)
fndar_err dar_archive_diff(const(dar_archive) * a, const(dar_archive) * b, dar_diff_result * outRes)
fndar_err dar_archive_test(const(dar_archive) * h, dar_test_result * outRes)
fndar_err dar_test_opts_create(dar_test_opts * * outPtr)
fndar_err dar_test_opts_destroy(dar_test_opts * to)
fndar_err dar_test_opts_set_compare_data(dar_test_opts * to, int v)
fndar_err dar_test_opts_set_compare_ea(dar_test_opts * to, int v)
fndar_err dar_test_opts_set_compare_fsa(dar_test_opts * to, int v)
fndar_err dar_test_opts_set_info_details(dar_test_opts * to, int v)
fndar_err dar_test_opts_set_display_treated(dar_test_opts * to, int display_treated, int only_dir)
fndar_err dar_test_opts_add_include(dar_test_opts * to, const char * pattern)
fnint dar_test_opts_get_compare_data(const(dar_test_opts) * to)
fnint dar_test_opts_get_compare_ea(const(dar_test_opts) * to)
fnint dar_test_opts_get_compare_fsa(const(dar_test_opts) * to)
fnint dar_test_opts_get_info_details(const(dar_test_opts) * to)
fnvoid dar_test_opts_get_display_treated(const(dar_test_opts) * to, int * display_treated, int * only_dir)
fnuint dar_test_opts_include_count(const(dar_test_opts) * to)
fndar_err dar_test_opts_get_include_at(const(dar_test_opts) * to, uint idx, const char * * out_pattern)
fndar_err dar_archive_test_with_opts(const(dar_archive) * h, const(dar_test_opts) * to, dar_test_result * outRes)
fndar_err dar_archive_isolate(const(dar_archive) * h, const char * out_dir, dar_archive * * outHandle)
fndar_err dar_archive_repair(const char * path, const char * base, const char * ext, dar_archive * * outHandle)
fndar_err dar_repair_opts_create(dar_repair_opts * * outPtr)
fndar_err dar_repair_opts_destroy(dar_repair_opts * ro)
fndar_err dar_repair_opts_set_overwrite_policy(dar_repair_opts * ro, int policy)
fnint dar_repair_opts_get_overwrite_policy(const(dar_repair_opts) * ro)
fndar_err dar_repair_opts_set_slicing(dar_repair_opts * ro, ulong slice_size, ulong first_slice_size)
fnvoid dar_repair_opts_get_slicing(const(dar_repair_opts) * ro, ulong * slice_size, ulong * first_slice_size)
fndar_err dar_repair_opts_set_slice_perm(dar_repair_opts * ro, const char * perm)
fndar_err dar_repair_opts_get_slice_perm(const(dar_repair_opts) * ro, const char * * out_perm)
fndar_err dar_repair_opts_set_slice_user(dar_repair_opts * ro, const char * user)
fndar_err dar_repair_opts_get_slice_user(const(dar_repair_opts) * ro, const char * * out_user)
fndar_err dar_repair_opts_set_slice_group(dar_repair_opts * ro, const char * group)
fndar_err dar_repair_opts_get_slice_group(const(dar_repair_opts) * ro, const char * * out_group)
fndar_err dar_archive_repair_with_opts(const char * path, const char * base, const char * ext, const(dar_repair_opts) * ro, dar_archive * * outHandle)
fndar_err dar_diff_opts_create(dar_diff_opts * * outPtr)
fndar_err dar_diff_opts_destroy(dar_diff_opts * o)
fndar_err dar_diff_opts_set_compare_data(dar_diff_opts * o, int v)
fndar_err dar_diff_opts_set_compare_metadata(dar_diff_opts * o, int v)
fndar_err dar_diff_opts_set_compare_ea(dar_diff_opts * o, int v)
fndar_err dar_diff_opts_set_compare_fsa(dar_diff_opts * o, int v)
fnint dar_diff_opts_get_compare_data(const(dar_diff_opts) * o)
fnint dar_diff_opts_get_compare_metadata(const(dar_diff_opts) * o)
fnint dar_diff_opts_get_compare_ea(const(dar_diff_opts) * o)
fnint dar_diff_opts_get_compare_fsa(const(dar_diff_opts) * o)
fndar_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)
fndar_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)
fndar_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)
fndar_err dar_incr_opts_create(dar_incr_opts * * outPtr)
fndar_err dar_incr_opts_destroy(dar_incr_opts * io)
fndar_err dar_incr_opts_set_reference(dar_incr_opts * io, const char * path, const char * base, const char * ext, uint min_digits)
fndar_err dar_incr_opts_get_reference(const(dar_incr_opts) * io, const char * * path, const char * * base, const char * * ext, uint * min_digits)
fndar_err dar_incr_opts_set_change_policy(dar_incr_opts * io, int policy)
fnint dar_incr_opts_get_change_policy(const(dar_incr_opts) * io)
fndar_err dar_incr_opts_set_snapshot(dar_incr_opts * io, const char * filename)
fndar_err dar_incr_opts_get_snapshot(const(dar_incr_opts) * io, const char * * filename)
fndar_err dar_incr_opts_set_mode(dar_incr_opts * io, int mode)
fnint dar_incr_opts_get_mode(const(dar_incr_opts) * io)
fndar_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)
fndar_err dar_merge_opts_create(dar_merge_opts * * outPtr)
fndar_err dar_merge_opts_destroy(dar_merge_opts * mo)
fndar_err dar_merge_opts_set_overwrite_policy(dar_merge_opts * mo, int policy)
fnint dar_merge_opts_get_overwrite_policy(const(dar_merge_opts) * mo)
fndar_err dar_merge_opts_set_slicing(dar_merge_opts * mo, ulong slice_size, ulong first_slice_size)
fnvoid dar_merge_opts_get_slicing(const(dar_merge_opts) * mo, ulong * slice_size, ulong * first_slice_size)
fndar_err dar_merge_opts_set_compression(dar_merge_opts * mo, int algo)
fnint dar_merge_opts_get_compression(const(dar_merge_opts) * mo)
fndar_err dar_merge_opts_set_compression_level(dar_merge_opts * mo, uint level)
fnuint dar_merge_opts_get_compression_level(const(dar_merge_opts) * mo)
fndar_err dar_merge_opts_set_compression_block_size(dar_merge_opts * mo, uint block_size)
fnuint dar_merge_opts_get_compression_block_size(const(dar_merge_opts) * mo)
fndar_err dar_merge_opts_set_filter(dar_merge_opts * mo, const(dar_filter_opts) * fo)
fnint dar_merge_opts_has_filter(const(dar_merge_opts) * mo)
fndar_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)
fndar_err dar_archive_get_summary(const(dar_archive) * h, dar_archive_summary * out_summary)
fnvoid dar_archive_summary_clear(dar_archive_summary * s)
fnvoid dar_operation_stats_init(dar_operation_stats * s)
fndar_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)
fndar_err dar_archive_extract_with_stats(const(dar_archive) * h, const char * out_dir, dar_operation_stats * stats)
fndar_err dar_archive_test_with_stats(const(dar_archive) * h, dar_test_result * out_result, dar_operation_stats * stats)
fndar_err dar_isolate_opts_create(dar_isolate_opts * * outPtr)
fndar_err dar_isolate_opts_destroy(dar_isolate_opts * io)
fndar_err dar_isolate_opts_set_allow_over(dar_isolate_opts * io, int allow_over)
fndar_err dar_isolate_opts_set_warn_over(dar_isolate_opts * io, int warn_over)
fndar_err dar_isolate_opts_set_info_details(dar_isolate_opts * io, int info_details)
fndar_err dar_isolate_opts_set_compression(dar_isolate_opts * io, int algo)
fndar_err dar_isolate_opts_set_compression_level(dar_isolate_opts * io, uint level)
fndar_err dar_isolate_opts_set_compression_block_size(dar_isolate_opts * io, uint block_size)
fndar_err dar_isolate_opts_set_slicing(dar_isolate_opts * io, ulong slice_size, ulong first_slice_size)
fnint dar_isolate_opts_get_allow_over(const(dar_isolate_opts) * io)
fnint dar_isolate_opts_get_warn_over(const(dar_isolate_opts) * io)
fnint dar_isolate_opts_get_info_details(const(dar_isolate_opts) * io)
fnint dar_isolate_opts_get_compression(const(dar_isolate_opts) * io)
fnuint dar_isolate_opts_get_compression_level(const(dar_isolate_opts) * io)
fnuint dar_isolate_opts_get_compression_block_size(const(dar_isolate_opts) * io)
fnvoid dar_isolate_opts_get_slicing(const(dar_isolate_opts) * io, ulong * slice_size, ulong * first_slice_size)
fndar_err dar_archive_isolate_with_opts(const(dar_archive) * h, const char * out_dir, const(dar_isolate_opts) * io, dar_archive * * outHandle)
fndar_err dar_filter_opts_create(dar_filter_opts * * outPtr)
fndar_err dar_filter_opts_destroy(dar_filter_opts * fo)
fndar_err dar_filter_opts_add_include(dar_filter_opts * fo, const char * pattern)
fndar_err dar_filter_opts_add_exclude(dar_filter_opts * fo, const char * pattern)
fndar_err dar_filter_opts_add_include_path(dar_filter_opts * fo, const char * pattern)
fndar_err dar_filter_opts_add_exclude_path(dar_filter_opts * fo, const char * pattern)
fndar_err dar_filter_opts_add_ea_include(dar_filter_opts * fo, const char * pattern)
fndar_err dar_filter_opts_add_ea_exclude(dar_filter_opts * fo, const char * pattern)
fndar_err dar_filter_opts_set_min_size(dar_filter_opts * fo, ulong min_size)
fndar_err dar_filter_opts_get_min_size(const(dar_filter_opts) * fo, ulong * out_min_size)
fndar_err dar_filter_opts_set_max_size(dar_filter_opts * fo, ulong max_size)
fndar_err dar_filter_opts_get_max_size(const(dar_filter_opts) * fo, ulong * out_max_size)
fndar_err dar_filter_opts_set_case_sensitive(dar_filter_opts * fo, int case_sensitive)
fndar_err dar_filter_opts_get_case_sensitive(const(dar_filter_opts) * fo, int * out_case_sensitive)
fndar_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)
fndar_err dar_xform_create_from_path(const char * path, const char * basename, const char * extension, uint min_digits, const char * execute, dar_xform * * outHandle)
fndar_err dar_xform_create_from_pipe(const char * pipename, dar_xform * * outHandle)
fndar_err dar_xform_create_from_fd(int fd, dar_xform * * outHandle)
fndar_err dar_xform_destroy(dar_xform * xf)
fndar_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)
fndar_err dar_xform_to_fd(dar_xform * xf, int fd, const char * execute)
fnuint dar_feat_bits()
fndar_err dar_database_create_empty(dar_database * * outDb)
fndar_err dar_database_load(const char * filename, dar_database * * outDb)
fndar_err dar_database_dump(const(dar_database) * db, const char * filename)
fndar_err dar_database_destroy(dar_database * db)
fndar_err dar_database_add_archive(dar_database * db, const char * path, const char * base, const char * ext)
fndar_err dar_database_remove_range(dar_database * db, uint min_index, uint max_index)
fndar_err dar_database_list(const(dar_database) * db, dar_db_list_cb cb, void * ctx)
fndar_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.
fndar_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.
fndar_err dar_slave_run(dar_slave * s)Run the slave, serving archive data until the master disconnects.
fndar_err dar_slave_destroy(dar_slave * s)Destroy a dar_slave instance.
fndar_err dar_mask_create_bool(int value, dar_mask * * outMask)Create a bool_mask (always returns the given boolean value).
fndar_err dar_mask_create_simple(const char * pattern, int case_sensitive, dar_mask * * outMask)Create a simple_mask (glob pattern matching like shell wildcards).
fndar_err dar_mask_create_regex(const char * pattern, int case_sensitive, dar_mask * * outMask)Create a regular_mask (POSIX regular expression matching).
fndar_err dar_mask_create_not(const(dar_mask) * inner, dar_mask * * outMask)Create a not_mask (negation of another mask).
fndar_err dar_mask_create_and(dar_mask * * outMask)Create an et_mask (AND combination, initially empty).
fndar_err dar_mask_create_or(dar_mask * * outMask)Create an ou_mask (OR combination, initially empty).
fndar_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).
fndar_err dar_mask_create_same_path(const char * path, int case_sensitive, dar_mask * * outMask)Create a samepathmask (exact path matching, no wildcards).
fndar_err dar_mask_create_exclude_dir(const char * path, int case_sensitive, dar_mask * * outMask)Create an excludedirmask (matches path and all its subdirectories).
fndar_err dar_mask_destroy(dar_mask * m)Destroy a mask.
fndar_err dar_mask_add(dar_mask * combination, const(dar_mask) * toAdd)Add a mask to an AND or OR combination.
fndar_err dar_mask_clear(dar_mask * combination)Clear all masks from an AND or OR combination.
fnuint dar_mask_size(const(dar_mask) * combination)Get the number of masks in an AND or OR combination.
fndar_err dar_mask_is_covered(const(dar_mask) * m, const char * expression, int * result)Test if a string is covered by the mask.
fnint dar_mask_get_type(const(dar_mask) * m)Get the type of a mask.
fndar_err dar_mask_dump(const(dar_mask) * m, const char * * outDump)Get a human-readable dump of the mask structure.
fnint dar_cancel_is_available()Check if thread cancellation is available.
fndar_err dar_cancel_thread(ulong tid, int immediate, ulong flag)Request cancellation of a libdar operation in the specified thread.
fndar_err dar_cancel_status(ulong tid, int * status)Get the cancellation status of a thread.
fndar_err dar_cancel_clear(ulong tid, int * was_pending)Clear a pending cancellation request for a thread.
fnulong dar_get_thread_id()Get the current thread ID for use with cancellation functions.
fnbool isShimLinked() @safeReturns true if the C++ shim is linked and reachable.
fnstring darVersion() @safeReturns libdar version string as reported by the shim (e.g., "7.0.0").
fnbool featureLargefile() @safe @nogc nothrowReturns true if libdar was built with largefile (>2GiB) support.
fnbool featureThreadSafe() @safe @nogc nothrowReturns true if libdar was built as thread‑safe.
fnbool featureLibZ() @safe @nogc nothrowReturns true if zlib compression is available.
fnbool featureLibBz2() @safe @nogc nothrowReturns true if bzip2 compression is available.
fnbool featureLibXz() @safe @nogc nothrowReturns true if xz (lzma) compression is available.
fnbool featureLibLz4() @safe @nogc nothrowReturns true if lz4 compression is available.
fnbool featureLibZstd() @safe @nogc nothrowReturns true if zstd compression is available.
fnbool featureLibgcrypt() @safe @nogc nothrowReturns true if libgcrypt (crypto) is available.
fnbool featureLibrsync() @safe @nogc nothrowReturns true if librsync (delta compression) is available.
fnbool featureRemoteRepository() @safe @nogc nothrowReturns true if remote repositories are supported.
fnbool featureFtpRepository() @safe @nogc nothrowReturns true if FTP repository is supported.
fnbool featureSftpRepository() @safe @nogc nothrowReturns true if SFTP repository is supported.
fnbool featurePosixFadvise() @safe @nogc nothrowReturns true if posix_fadvise support is available.
fnuint featureBits() @safe @nogc nothrowReturns the internal integer bits used by libdar (0 means infinint).
fnchar featureSystemEndian() @safe @nogc nothrowReturns the system endian reported by libdar ('B' big, 'L' little).
fnulong featureThreadStackSize() @safe @nogc nothrowReturns the configured thread stack size for libdar threads (0 means default).
fnstring featureLibthreadarVersion() @safeReturns the libthreadar version string, or empty if not available.
fnbool cancelIsAvailable() @safe @nogc nothrowReturns true if thread cancellation is available.
fnulong getThreadId() @safe @nogc nothrowReturns the current thread ID for use with cancellation functions.
fnvoid cancelThread(ulong tid, bool immediate = true, ulong flag = 0) @safeRequest cancellation of a libdar operation in the specified thread.
fnbool cancelStatus(ulong tid) @safeGet the cancellation status of a thread.
fnbool cancelClear(ulong tid) @safeClear a pending cancellation request for a thread.
private fnDarException makeException(int code, string msg) @safeInternal: create specific exception instance based on error code.
fnvoid throwOnError(dar_err e) @safeThrows a DarException if `e.code != DAR_OK`.
fnvoid throwOnError(dar_err e, string operation) @safeThrows a DarException enriched with operation name.
fnvoid throwOnError(dar_err e, string operation, string path, string base, string ext) @safeThrows a DarException enriched with archive coordinates.
fnvoid throwOnError(dar_err e, string operation, string filePath) @safeThrows a DarException enriched with a related filesystem path.
fnvoid 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.
fnArchiveHandle openArchiveRead(string path, string base, string ext, ReadOptions ro = null) @safeOpens an archive for reading using minimal parameters.
fnvoid listArchive(const ArchiveHandle h, scope void delegate(string path, ListEntry entry) @safe cb) @safeLists archive entries, invoking the provided callback for each one.
fnvoid 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.
fnvoid extractArchive(const ArchiveHandle h, string outDir) @safeExtracts the archive contents to the provided output directory.
fnvoid extractArchive(const ArchiveHandle h, string outDir, ExtractOptions eo) @safeExtract archive using custom ExtractOptions.
fnDiffResult diffArchives(const ArchiveHandle a, const ArchiveHandle b) @safeCompares two archives and returns a simple diff result.
fnDiffResultEx 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.
fnTestResult testArchive(const ArchiveHandle h) @safeVerifies archive integrity by checking all stored files.
fnTestResult testArchive(const ArchiveHandle h, TestOptions to) @safeTests an archive using custom TestOptions.
fnArchiveSummary getArchiveSummary(const ArchiveHandle h) @safeRetrieves summary metadata for an open archive.
fnArchiveHandle createArchiveWithStats(string fsRoot, string outDir, string base, string ext, CreateOptions co, out OperationStats stats) @safeCreates an archive with full operation statistics.
fnvoid extractArchiveWithStats(const ArchiveHandle h, string outDir, out OperationStats stats) @safeExtracts an archive with full operation statistics.
fnvoid extractArchiveWithStats(const ArchiveHandle h, string outDir, ExtractOptions eo, out OperationStats stats) @safeExtract with options and operation statistics.
fnTestResult testArchiveWithStats(const ArchiveHandle h, out OperationStats stats) @safeTests archive integrity with full operation statistics.
fnArchiveHandle createArchiveFiltered(string fsRoot, string outDir, string base, string ext, CreateOptions co, FilterOptions fo, out OperationStats stats) @safeCreates an archive with file filtering support.
fnArchiveHandle createArchiveFiltered(string fsRoot, string outDir, string base, string ext, CreateOptions co, FilterOptions fo) @safeCreates an archive with file filtering support (no stats).
private fnOperationStats populateStats(ref const dar_operation_stats raw) @safe @nogc nothrowHelper to convert C struct to D struct
fnArchiveHandle 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.
fnArchiveHandle 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.
fnArchiveHandle repairArchive(string path, string base, string ext) @safeRepairs an archive and returns a new handle. Placeholder creates a marker file.
fnArchiveHandle 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".
fnArchiveHandle createArchive(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safeCreates an archive (full backup) writing slices to the given output directory.
fnArchiveHandle createArchiveIncremental(string fsRoot, string outDir, string base, string ext, CreateOptions co) @safeCreates an incremental (differential) archive. Placeholder marks archive with an extra file.
fnArchiveHandle 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.
fnArchiveHandle mergeArchives(const ArchiveHandle base, const ArchiveHandle diff, string outDir, string mergedBase, string ext, MergeOptions mo) @safeMerges two archives using custom MergeOptions.
fnArchiveHandle createArchiveIncremental(string fsRoot, string outDir, string base, string ext, CreateOptions co, IncrementalOptions io) @safeCreates an incremental or differential archive using custom IncrementalOptions.
fnXformHandle xformFromPath(string path, string base, string ext, uint minDigits = 0, string execute = null) @safeCreates an xform from path/base/ext source.
fnXformHandle xformFromPipe(string pipeName) @safeCreates an xform from a named pipe.
fnXformHandle xformFromFd(int fd) @safeCreates an xform from a file descriptor.
fnvoid 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.
fnvoid xformToFd(XformHandle xf, int fd, string execute = null) @safeRuns the transform to a file descriptor.
fnDatabaseHandle createEmptyDatabase() @safeCreates an empty database.
fnDatabaseHandle loadDatabase(string filename) @safeLoads a database from a dumped file (shim placeholder format).
fnvoid dumpDatabase(const DatabaseHandle db, string filename) @safeDumps the database to a file (shim placeholder).
fnvoid addArchiveToDatabase(DatabaseHandle db, string path, string base, string ext) @safeAdds an archive reference to the database.
fnvoid removeRangeFromDatabase(DatabaseHandle db, uint minIndex, uint maxIndex) @safeRemoves archives by index range [minIndex, maxIndex] inclusive (0-based).
fnvoid listDatabase(const DatabaseHandle db, scope void delegate(DbEntry) @safe cb) @safeLists archives stored in the database, invoking the provided callback for each entry.