| Disk ARchive 2.7.18 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Files | Classes | Macros | Typedefs | Enumerations | Functions | Variables
Private

Libdar internal symbols. More...

## Files
file | block_compressor.hpp
| provide per block compression/decompression independant from libthreadar but single threaded
file | bzip2_module.hpp
| per block encryption using bzip2 algorithm/library
file | cache.hpp
| contains the cache class
file | cache_global.hpp
| adaptation of the cache class to the fichier_global interface
file | candidates.hpp
| helper class for class data_tree to find the list of archive to restore for a given file
file | capabilities.hpp
| provide information about current thread (underlying using the widthdrawn POSIX.1e API)
file | cat_all_entrees.hpp
| include file gathering all entree found in a catalogue
file | cat_blockdev.hpp
| class used to record block special devices in a catalogue
file | cat_chardev.hpp
| class used to record character special devices in a catalogue
file | cat_delta_signature.hpp
| class used to manage binary delta signature in catalogue and archive
file | cat_detruit.hpp
| used to record information in a catalogue about a deleted file (differential backup context)
file | cat_device.hpp
| parent class for all special devices inodes
file | cat_directory.hpp
| class used to organize objects in tree in catalogue as like directories in a filesystem
file | cat_door.hpp
| class used in a catalogue to store solaris door filesystem entries
file | cat_entree.hpp
| base class for all object contained in a catalogue
file | cat_eod.hpp
| object exchanged with a catalogue (never stored in it) to signal the end of a directory
file | cat_etoile.hpp
| class holding an cat_inode object that get pointed by multiple mirage objects (smart pointers) to record hard links in a catalogue
file | cat_file.hpp
| class used to record plain files in a catalogue
file | cat_ignored.hpp
| class used to remember that an entry has been ignored and shall not be recorded as deleted using a detruit object in a catalogue
file | cat_ignored_dir.hpp
| class used to remember in a catalogue that a cat_directory has been ignored
file | cat_inode.hpp
| base object for all inode types, managed EA and FSA, dates, permissions, ownership, ...
file | cat_lien.hpp
| class used to store symbolic links in a catalogue
file | cat_mirage.hpp
| smart pointer to an etoile object. Used to store hard link information inside a catalogue
file | cat_nomme.hpp
| base class of all objects contained in a catalogue and that can be named
file | cat_prise.hpp
| class to record filesystem (UNIX) sockets in a catalogue
file | cat_signature.hpp
| class used to write and read from archive the type and status of each entry in a catalogue
file | cat_status.hpp
| the different status of data and EA
file | cat_tube.hpp
| class to record named pipes in a catalogue
file | catalogue.hpp
| here is defined the classe used to manage catalogue of archives
file | compress_block_header.hpp
| block header used for compression per block
file | compress_module.hpp
| provides abstracted interface of per-block compression/decompression
file | compressor.hpp
| compression engine implementation
file | compressor_zstd.hpp
| streaming compression implementation for zstd algorithm
file | contextual.hpp
| class contextual adds the information of phases in the generic_file
file | crc.hpp
| class crc definition, used to handle Cyclic Redundancy Checks
file | crypto_asym.hpp
| the asymetric cryptographical algoritms relying on gpgme
file | crypto_module.hpp
| per block cryptography implementation
file | crypto_segment.hpp
| defines unit block of information ciphered as once
file | crypto_sym.hpp
| class crypto_sym for symetrical cipherings
file | cygwin_adapt.h
| thin C adaptation layer to Cygwin specifities
file | cygwin_adapt.hpp
| thin C++ adaptation layer to Cygwin specifities
file | data_dir.hpp
| classes used to store directory tree information in dar_manager databases
file | data_tree.hpp
| base classes used to store entree information in dar_manager databases
file | database_header.hpp
| defines the database structure in file
file | defile.hpp
| here is defined the defile class
file | ea.hpp
| contains a set of routines to manage EA values associated to a file
file | ea_filesystem.hpp
| filesystem dependent Extended Attributes operations
file | elastic.hpp
| here is defined the elastic class
file | entrepot_local.hpp
| defines the implementation for local filesystem entrepot The entrepot_local correspond to the local filesystems.
file | erreurs_ext.hpp
| contains some additional exception class thrown by libdar
file | escape.hpp
| class escape definition, used for sequential reading of archives
file | escape_catalogue.hpp
| class escape_catalogue definition. Used for sequential writing to archives, as well as several other inherited classes from catalogue.hpp
file | etage.hpp
| definition of the etage structure is done here
file | fichier_global.hpp
| class fichier_global definition. This class is a pure virtual class class fichier_global is an abstraction of files objects whatever is their localisation like local filesystem, remote ftp server, etc. inherited classes (like fichier_local) provide full implementation
file | fichier_libcurl.hpp
| class fichier_libcurl definition. This is a full implementation/inherited class of class fichier_global this type of object are generated by entrepot_libcurl.
file | fichier_local.hpp
| class fichier_local definition. This is a full implementation/inherited class of class fichier_global this type of object are generated by entrepot_local.
file | filesystem_backup.hpp
| filesystem_backup class realizes the interface with the filesystem for backing up
file | filesystem_diff.hpp
| class filesystem_diff makes a flow of inode to feed the difference filter routine
file | filesystem_hard_link_read.hpp
| filesystem_hard_link_read classes manages hardlinked inode read from filesystem
file | filesystem_hard_link_write.hpp
| class filesystem_hard_link_write keeps trace of already written inode to restore hard links
file | filesystem_ids.hpp
| gather the ids of different filesystem to provide a filter based on filesystem
file | filesystem_restore.hpp
| class filesystem_restores create inodes from a flow of libdar objects
file | filesystem_specific_attribute.hpp
| filesystem specific attributes
file | filesystem_tools.hpp
| a set of tools used by filesystem_* classes
file | filtre.hpp
| here is all the core routines for the operations
file | generic_file.hpp
| class generic_file is defined here as well as class fichier
file | generic_file_overlay_for_gpgme.hpp
| adaptation class from gpgme data buffer to libdar generic_file interface
file | generic_rsync.hpp
| class generic_rsync provides a generic_file interface to librsync
file | generic_to_global_file.hpp
| this class provides an fichier_global interface for any type of generic_file object
file | gf_mode.hpp
| generic modes to open file
file | gzip_module.hpp
| per block encryption using gzip algorithm/library
file | hash_fichier.hpp
| class hash_fichier definition.
file | header.hpp
| slice header structure is defined here
file | header_flags.hpp
| archive header flag field management
file | header_version.hpp
| archive global header/trailer structure is defined here
file | heap.hpp
| heap data structure (relying on FIFO)
file | i_archive.hpp
| the archive class implementation is defined in this module
file | i_database.hpp
| this file holds the definition of class database implementation (pimpl idiom)
file | i_entrepot_libcurl.hpp
| defines the implementation for remote filesystem entrepot using libcurl
file | i_libdar_xform.hpp
| API for dar_xform functionnality.
file | int_tools.hpp
| elementary operation for infinint integers
file | label.hpp
| define the datastructure "label" used to identify slice membership to an archive
file | lz4_module.hpp
| per block encryption using LZ4 algorithm/library
file | lzo_module.hpp
| per block encryption using LZO algorithm/library
file | macro_tools.hpp
| macroscopic tools for libdar internals
file | mem_block.hpp
| structure to hold block of memory and manipulate in coherence with idexes and sizes
file | mem_ui.hpp
| class mem_ui definition. This class is to be used as parent class to handle user_interaction object management
file | memory_file.hpp
| Memory_file is a generic_file class that only uses virtual memory.
file | mycurl_easyhandle_node.hpp
| used to optimize session creation done by libcurl
file | mycurl_easyhandle_sharing.hpp
| used to optimize network session establised by libcurl
file | mycurl_param_list.hpp
| wrapper for element a CURL* object can receive as parameter in order to be put in etherogeneous list
file | mycurl_slist.hpp
| wrapper of the curl_slist struct to allow usual copy/move on C++ object
file | nls_swap.hpp
| provides a set of macro to change the NLS from user application domaine to libdar domain and viceversa
file | null_file.hpp
| /dev/null type file implementation under the generic_file interface
file | op_tools.hpp
| contains tools helper for overwriting policy management
file | parallel_block_compressor.hpp
| provide per block and parallel compression/decompression
file | parallel_tronconneuse.hpp
| defines a block structured file.
file | pile.hpp
| class pile definition. Used to manage a stack of generic_file objects
file | pile_descriptor.hpp
| optimization structure to quickly access some commonly used layers of a stack of generic_file
file | proto_compressor.hpp
| abstracted ancestor class for compressor and parallel_compressor classes
file | proto_generic_file.hpp
| precursor class of generic_file used to avoid cyclic dependencies with storage and infinint
file | proto_tronco.hpp
| defines common interface for tronconneuse and parallel_tronconneuse
file | sar.hpp
| the sar and trivial_sar classes, they manage the slicing layer
file | sar_tools.hpp
| a set of tools aims to help Segmentation And Reassemblement (sar) class
file | scrambler.hpp
| contains the definition of the scrambler class, a very weak encryption scheme
file | secu_memory_file.hpp
| secu_memory_file is a generic_file class that only uses secured memory (not swappable and zeroed after use)
file | semaphore.hpp
| definition of class semaphore, used to manage invocation of backup hook for files
file | slave_zapette.hpp
| remote control for dar_slave.
file | slice_layout.hpp
| object describing the slicing of an archive
file | smart_pointer.hpp
| template class implementing memory efficient smart pointer
file | sparse_file.hpp
| class sparse_file definition, used to handle holes in files
file | storage.hpp
| contains a class that permits arbitrary large data storage
file | terminateur.hpp
| the terminateur class which defines the position of the catalogue
file | tlv.hpp
| Generic Type Length Value data structures.
file | tlv_list.hpp
| List of Generic Type Length Value data structures.
file | tools.hpp
| a set of general purpose routines
file | trivial_sar.hpp
| the trivial_sar classes manages the slicing layer when single slice is used
file | tronc.hpp
| defines a limited segment over another generic_file.
file | tronconneuse.hpp
| defines a block structured file.
file | trontextual.hpp
| class trontextual is a contextual variant of class tronc
file | tuyau.hpp
| defines the implementation of pipe under the generic_file interface.
file | tuyau_global.hpp
| seekable pipe on top of another fichier_global
file | user_group_bases.hpp
| defines class that speed up the uid to username and gid to group name lookup
file | wrapperlib.hpp
| libz and libbz2 wrapper to have identical interface to these libraries.
file | xz_module.hpp
| per block encryption using xz algorithm/library
file | zapette.hpp
| remote control between dar and dar_slave.
file | zapette_protocol.hpp
| protocol management between archive and libdar_slave classes
file | zstd_module.hpp
| per block encryption using zstd algorithm/library
file | my_config.h
| include macro defined by the configure script and some specific additional ones

## Classes
class | libdar::cache
| the cache class implements a fixed length read/write caching mechanism More...
class | libdar::cache_global
| the cache_global cache is an adaptation of the cache class to the fichier_global interface More...
class | libdar::candidates
| helper class for data_tree More...
class | libdar::cat_blockdev
| the block device class More...
class | libdar::cat_chardev
| the char device class More...
class | libdar::cat_delta_signature
| the cat_delta_signature file class More...
class | libdar::cat_detruit
| the deleted file entry More...
class | libdar::cat_device
| the special cat_device root class More...
class | libdar::cat_directory
| the cat_directory inode class More...
class | libdar::cat_door
| the class for Door IPC (mainly for Solaris) More...
class | libdar::cat_entree
| the root class from all other inherite for any entry in the catalogue More...
class | libdar::cat_eod
| the End of Directory entry class More...
class | libdar::cat_etoile
| the hard link implementation More...
class | libdar::cat_file
| the plain file class More...
class | libdar::cat_ignored
| the present file to ignore (not to be recorded as deleted later) More...
class | libdar::cat_ignored_dir
| the ignored cat_directory class, to be promoted later as empty cat_directory if needed More...
class | libdar::cat_inode
| the root class for all cat_inode More...
class | libdar::cat_lien
| the symbolic link inode class More...
class | libdar::cat_mirage
| the hard link implementation, cat_mirage is the named entry owned by a directory it points to a common "cat_etoile class" More...
class | libdar::cat_nomme
| the base class for all entry that have a name More...
class | libdar::cat_prise
| the Unix socket inode class More...
class | libdar::cat_signature
| class cat_signature combines the cat_entree::signature() of the object with its saved_status and read and store this combinason More...
class | libdar::cat_tube
| the named pipe class More...
class | libdar::catalogue
| the catalogue class which gather all objects contained in a give archive More...
struct | libdar::compress_block_header
| block header structure used for storing compressed blocks More...
class | libdar::compressor
| compression class for gzip and bzip2 algorithms More...
class | libdar::compressor_zstd
| compression class for zstd algorithms More...
class | libdar::contextual
| the contextual class adds the information of phases in the generic_file More...
class | libdar::crc
| pure virtual class defining interface of a CRC object More...
class | libdar::crc_i
| crc implementation based on infinint More...
class | libdar::crc_n
| crc implementation based on U_I More...
class | libdar::crypto_asym
| asymetric ciphering More...
class | libdar::crypto_sym
| symetrical strong encryption, interface to grypt library More...
class | libdar::data_dir
| the data_dir class inherits from data_tree and holds the directory tree's parent relationship More...
class | libdar::data_tree
| the data_tree class stores presence of a given file in a set of archives More...
class | libdar::defile
| the defile class keep trace of the real path of files while the flow in the filter routines More...
class | libdar::ea_attributs
| the class ea_attributs manages the set of EA that can be associated to an inode More...
class | libdar::elastic
| the elastic buffer class More...
class | libdar::entrepot_local
class | libdar::Ethread_cancel_with_attr
| Ethread_cancel with infinint attribute. More...
struct | libdar::etage
| the etage structure keep trace of directory contents More...
class | libdar::fichier_global
| abstraction of filesystem files for entrepot More...
class | libdar::fichier_local
| filesystem local files More...
class | libdar::filesystem_backup
| makes a flow sequence of inode to feed the backup filtering routing More...
class | libdar::filesystem_diff
| make a flow of inode to feed the difference filter routine More...
class | libdar::filesystem_hard_link_read
| keep trace of hard links when reading the filesystem More...
class | libdar::filesystem_hard_link_write
| keep trace of already written inodes to restore hard links More...
class | libdar::filesystem_restore
| receive the flow of inode from the restoration filtering routing and promotes these to real filesystem objects More...
class | libdar::filesystem_specific_attribute
| Filesystem Specific Attributes (FSA) class. More...
class | libdar::filesystem_specific_attribute_list
| interface to fileystem for FSA More...
class | libdar::fsa_infinint
| fsa based on integer More...
class | libdar::fsa_time
| fsa based on time More...
class | libdar::generic_file
| this is the interface class from which all other data transfer classes inherit More...
class | libdar::generic_file_overlay_for_gpgme
| generic_file interface for for gpgme More...
class | libdar::generic_rsync
| generic_file interface to librsync More...
class | libdar::generic_to_global_file
| provides a fichier_global interface for any type of generic_file More...
class | libdar::hash_fichier
| manages the generation of a hash More...
class | libdar::header
| this class manages the header of each slice More...
class | libdar::header_flags
| manages the flag field used for now in the archive header More...
class | libdar::header_version
| manages the archive header and trailer More...
class | libdar::heap< T >
| the class heap is nothing related to the common heap datastructure this is just a "heap" in the sense of a pool of preallocated objects More...
class | libdar::database::i_database
| the class i_database is the implementation of class database More...
class | libdar::libdar_xform::i_libdar_xform
| class implementing the dar_xform feature More...
class | libdar::label
| manage label data structure used in archive slice headers More...
class | libdar::limitint< B >
class | libdar::mem_ui
| class mem_ui to keep a copy of a user_interaction object More...
class | libdar::memory_file
| generic_file stored in memory More...
class | libdar::mycurl_param_element_generic
| the ancestor class of etherogeneous list/map More...
class | libdar::mycurl_param_element< T >
| the implemented inherited classes of the abstracted class for etherogeneous list/map More...
class | libdar::mycurl_param_list
class | libdar::null_file
| the null_file class implements the /dev/null behavior More...
class | libdar::parallel_tronconneuse
| this is a partial implementation of the generic_file interface to cypher/decypher data block by block. More...
class | libdar::pile
| stores a stack of generic_files writing/reading on each others More...
class | libdar::proto_generic_file
| ancestor class of generic_file More...
class | libdar::sar
| Sar class stands for Segmentation And Reassembly class. More...
class | libdar::scrambler
| scrambler is a very weak encryption scheme More...
class | libdar::semaphore
| class semaphore More...
class | libdar::slave_zapette
| this class answers to order given by a zapette object More...
class | libdar::smart_node< T >
| class which holds the address of the allocated memory for many smart_pointers More...
class | libdar::smart_pointer< T >
| smart pointer class to be used to automagically manage multiple time pointed to address More...
class | libdar::statistics
| class used by libdar::archive class to give a summary of treated file during and after an operation More...
class | libdar::storage
| arbitrary large storage structure More...
class | libdar::terminateur
| terminateur class indicates the location of the beginning of the catalogue More...
class | libdar::thread_cancellation
| class to be used as parent to provide checkpoints to inherited classes More...
class | libdar::tlv
class | libdar::trivial_sar
class | libdar::tronc
| makes a segment of a generic_file appear like a real generic_file More...
class | libdar::tronconneuse
| this is a partial implementation of the generic_file interface to cypher/decypher data block by block. More...
class | libdar::trontextual
| trontextual class is a contextual class tronc, that's all. More...
class | libdar::tuyau
| pipe implementation under the generic_file interface. More...
class | libdar::tuyau_global
| the tuyau_global provides skip()/get_position() features on top of pipe-like object More...
class | libdar::wrapperlib
| this class encapsulates calls to libz or libbz2 More...
class | libdar::zapette
| zapette emulate a file that is remotely controlled by slave_zapette More...

## Macros
#define | O_TEXT 0
#define | O_BINARY 0

## Typedefs
using | libdar::magic_number = U_32
using | libdar::int_tools_bitfield = unsigned char[8]
typedef infinint(* | libdar::trailing_clear_data_callback) (generic_file &below, const archive_version &reading_ver)
| the trailing_clear_data_callback call back is a mean by which the upper layer cat tell when encrypted data ends

## Enumerations
enum | libdar::capa_status { libdar::capa_set , libdar::capa_clear , capa_unknown }
| the EFFECTIVE set the value of the associated capability for the calling thread More...
enum class | libdar::saved_status { libdar::saved_status::saved , libdar::saved_status::inode_only , libdar::saved_status::fake , libdar::saved_status::not_saved , libdar::saved_status::delta }
| data saved status for an entry More...
enum class | libdar::ea_saved_status { libdar::ea_saved_status::none , libdar::ea_saved_status::partial , libdar::ea_saved_status::fake , libdar::ea_saved_status::full , libdar::ea_saved_status::removed }
| EA saved status for an entry. More...
enum class | libdar::fsa_saved_status { libdar::fsa_saved_status::none , libdar::fsa_saved_status::partial , libdar::fsa_saved_status::full }
| FSA saved status for an entry. More...
enum | libdar::elastic_direction { elastic_forward , elastic_backward }
| reading direction of an elastic buffer More...
enum | libdar::gf_mode { libdar::gf_read_only , libdar::gf_write_only , libdar::gf_read_write }
| generic_file openning modes More...
enum | flag_type { flag_type_terminal = 'T' , flag_type_non_terminal = 'N' , flag_type_located_at_end_of_slice = 'E' }
enum class | libdar::compressor_block_flags { data = 0 , eof_die = 1 , error = 2 , worker_error = 3 }
| the different flags used to communicate between threads hold by parallel_block_compressor class More...
enum class | libdar::tronco_flags { normal = 0 , stop = 1 , eof = 2 , die = 3 , data_error = 4 , exception_below = 5 , exception_worker = 6 , exception_error = 7 }
| status flags used between parallel_tronconneuse and its sub-threads More...
enum | wrapperlib_mode { zlib_mode , bzlib_mode , xz_mode }

## Functions
capa_status | libdar::capability_LINUX_IMMUTABLE (user_interaction &ui, bool verbose)
capa_status | libdar::capability_SYS_RESOURCE (user_interaction &ui, bool verbose)
capa_status | libdar::capability_FOWNER (user_interaction &ui, bool verbose)
capa_status | libdar::capability_CHOWN (user_interaction &ui, bool verbose)
const char * | libdar::cat_entree_signature2string (unsigned char sign)
| convert a signature char to a human readable string
crc * | libdar::create_crc_from_file (proto_generic_file &f, bool old=false)
| generate a CRC object reading it from file
crc * | libdar::create_crc_from_size (infinint width)
| generate a CRC object with adhoc width based on a file size
bool | libdar::crypto_min_ver_libgcrypt_no_bug ()
generic_file * | libdar::database_header_create (const std::shared_ptr< user_interaction > &dialog, const std::string &filename, bool overwrite, compression algozip, U_I compr_level)
| create the header for a dar_manager database
generic_file * | libdar::database_header_open (const std::shared_ptr< user_interaction > &dialog, const std::string &filename, unsigned char &db_version, compression &algozip, U_I &compr_level)
| read the header of a dar_manager database
const unsigned char | libdar::database_header_get_supported_version ()
ea_attributs * | libdar::ea_filesystem_read_ea (const std::string &chemin, const mask &filter)
| read EA associated to a given file
bool | libdar::ea_filesystem_write_ea (const std::string &chemin, const ea_attributs &val, const mask &filter)
| overwrite some attribute to a given file's attribute list
void | libdar::ea_filesystem_clear_ea (const std::string &name, const mask &filter)
| remove all EA of a given file that match a given mask
bool | libdar::ea_filesystem_has_ea (const std::string &name)
| test the presence of EA for a given file
bool | libdar::ea_filesystem_has_ea (const std::string &name, const mask &filter)
| test the presence of EA for a given file
template<class T >
T * | libdar::cloner (const T *x)
bool | libdar::filesystem_tools_has_immutable (const cat_inode &arg)
void | libdar::filesystem_tools_set_immutable (const std::string &target, bool val, user_interaction &ui)
void | libdar::filesystem_tools_supprime (user_interaction &ui, const std::string &ref)
void | libdar::filesystem_tools_widen_perm (user_interaction &dialog, const cat_inode &ref, const std::string &chem, comparison_fields what_to_check)
void | libdar::filesystem_tools_make_owner_perm (user_interaction &dialog, const cat_inode &ref, const std::string &chem, comparison_fields what_to_check, const fsa_scope &scope)
void | libdar::filesystem_tools_make_date (const cat_inode &ref, const std::string &chem, comparison_fields what_to_check, const fsa_scope &scope)
void | libdar::filesystem_tools_attach_ea (const std::string &chemin, cat_inode *ino, const mask &ea_mask)
bool | libdar::filesystem_tools_is_nodump_flag_set (user_interaction &dialog, const path &chem, const std::string &filename, bool info)
path * | libdar::filesystem_tools_get_root_with_symlink (user_interaction &dialog, const path &root, bool info_details)
mode_t | libdar::filesystem_tools_get_file_permission (const std::string &path)
void | libdar::filesystem_tools_make_delta_patch (const std::shared_ptr< user_interaction > &dialog, const cat_file &existing, const std::string &existing_pathname, const cat_file &patcher, const path &directory)
fichier_local * | libdar::filesystem_tools_create_non_existing_file_based_on (const std::shared_ptr< user_interaction > &dialog, std::string filename, path where, std::string &new_filename)
| create in dirname a brand-new filename which name derives from filename
void | libdar::filesystem_tools_copy_content_from_to (const std::shared_ptr< user_interaction > &dialog, const std::string &source_path, const std::string &destination_path, const crc *expected_crc)
bool | libdar::filesystem_tools_read_linux_birthtime (const std::string &target, datetime &val)
| read the birthtime of target inode
void | libdar::filtre_restore (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, const path &fs_racine, bool fs_warn_overwrite, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, const mask &ea_mask, bool flat, comparison_fields what_to_check, bool warn_remove_no_match, bool empty, bool empty_dir, const crit_action &x_overwrite, archive_options_extract::t_dirty dirty, bool only_deleted, bool not_deleted, const fsa_scope &scope, bool ignore_unix_sockets)
void | libdar::filtre_sauvegarde (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const pile_descriptor &pdesc, catalogue &cat, const catalogue &ref, const path &fs_racine, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, bool display_finished, statistics &st, bool make_empty_dir, const mask &ea_mask, const mask &compr_mask, const infinint &min_compr_size, bool nodump, const infinint &hourshift, bool alter_time, bool furtive_read_mode, const filesystem_ids &same_fs, comparison_fields what_to_check, bool snapshot, bool cache_directory_tagging, bool security_check, const infinint &repeat_count, const infinint &repeat_byte, const infinint &fixed_date, const infinint &sparse_file_min_size, const std::string &backup_hook_file_execute, const mask &backup_hook_file_mask, bool ignore_unknown, const fsa_scope &scope, const std::string &exclude_by_ea, bool delta_signature, const infinint &delta_sig_min_size, const mask &delta_mask, bool delta_diff, bool auto_zeroing_neg_dates, const std::set< std::string > &ignored_symlinks, modified_data_detection mod_data_detect, const delta_sig_block_size &delta_sig_block_len)
void | libdar::filtre_difference (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, const path &fs_racine, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, const mask &ea_mask, bool alter_time, bool furtive_read_mode, comparison_fields what_to_check, const infinint &hourshift, bool compare_symlink_date, const fsa_scope &scope, bool isolated_mode)
void | libdar::filtre_test (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, bool empty, statistics &st)
void | libdar::filtre_merge (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const pile_descriptor &pdesc, catalogue &cat, const catalogue *ref1, const catalogue *ref2, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, bool make_empty_dir, const mask &ea_mask, const mask &compr_mask, const infinint &min_compr_size, bool keep_compressed, const crit_action &overwrite, bool warn_overwrite, bool decremental_mode, const infinint &sparse_file_min_size, const fsa_scope &scope, bool delta_signature, bool build_delta_sig, const infinint &delta_sig_min_size, const mask &delta_mask, const delta_sig_block_size &signature_block_size)
void | libdar::filtre_merge_step0 (const std::shared_ptr< user_interaction > &dialog, const catalogue *ref1, const catalogue *ref2, statistics &st, bool decremental_mode, crit_action *&decr, const crit_action *&overwrite, bool &abort, thread_cancellation &thr_cancel)
| initialize variables used for merging in step1 and step2
void | libdar::filtre_merge_step1 (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, catalogue &cat, const catalogue *ref1, const catalogue *ref2, bool info_details, bool display_treated, bool display_skipped, statistics &st, bool make_empty_dir, bool warn_overwrite, bool decremental_mode, crit_action *&decr, const crit_action *&overwrite, bool &abort, thread_cancellation &thr_cancel)
| builds a catalogue from two refs with the given policy and filters
void | libdar::filtre_merge_step2 (const std::shared_ptr< user_interaction > &dialog, const pile_descriptor &pdesc, catalogue &cat, bool info_details, bool display_treated, bool display_treated_only_dir, const mask &compr_mask, const infinint &min_compr_size, bool keep_compressed, const infinint &sparse_file_min_size, bool delta_signature, bool build_delta_sig, const infinint &delta_sig_min_size, const mask &delta_mask, bool &abort, thread_cancellation &thr_cancel, bool repair_mode, const delta_sig_block_size &signature_block_size)
| copies data of "cat" catalogue to the pdesc of a brand new archive
void | libdar::filtre_sequentially_read_all_catalogue (catalogue &cat, const std::shared_ptr< user_interaction > &dialog, bool lax_read_mode)
const char * | libdar::generic_file_get_name (gf_mode mode)
| provides a human readable string defining the gf_mode given in argument
| libdar::header_flags::header_flags (generic_file &f)
| libdar::header_flags::header_flags (const header_flags &ref)=default
| libdar::header_flags::header_flags (header_flags &&ref) noexcept=default
header_flags & | libdar::header_flags::operator= (const header_flags &ref)=default
header_flags & | libdar::header_flags::operator= (header_flags &&ref) noexcept=default
void | libdar::header_flags::set_bits (U_I bitfield)
| add all the bits set to 1 in the argument
void | libdar::header_flags::unset_bits (U_I bitfield)
| remove all the bits set to in in the argument
bool | libdar::header_flags::is_set (U_I bitfield) const
| return true if all bits of the argument set to 1, are set in this header_flags
void | libdar::header_flags::read (generic_file &f)
| set the header_flags from a generic_file
void | libdar::header_flags::dump (generic_file &f) const
| dump the header_flags to generic_file
void | libdar::header_flags::clear ()
| clear all flags
bool | libdar::header_flags::is_all_cleared ()
| whether all bits are cleared
static bool | libdar::header_flags::has_an_lsb_set (U_I bitfield)
| libdar::header_version::header_version (const header_version &ref)
| libdar::header_version::header_version (header_version &&ref) noexcept
header_version & | libdar::header_version::operator= (const header_version &ref)
header_version & | libdar::header_version::operator= (header_version &&ref) noexcept
void | libdar::header_version::read (generic_file &f, user_interaction &dialog, bool lax_mode)
| read the header or trailer from the archive
void | libdar::header_version::write (generic_file &f) const
| write down the object to the archive (as header if wrote at the beginning of the archive, as trailer is at the end)
void | libdar::header_version::set_edition (const archive_version &ed)
void | libdar::header_version::set_compression_algo (const compression &zip)
void | libdar::header_version::set_command_line (const std::string &line)
void | libdar::header_version::set_initial_offset (const infinint &offset)
void | libdar::header_version::set_sym_crypto_algo (const crypto_algo &algo)
void | libdar::header_version::set_crypted_key (memory_file *key)
| the object pointed to by key passes to the responsibility of this header_version object
void | libdar::header_version::clear_crypted_key ()
void | libdar::header_version::set_slice_layout (slice_layout *layout)
| the object pointed to by layout is passed under the responsibility of this header_version object
void | libdar::header_version::clear_slice_layout ()
void | libdar::header_version::set_tape_marks (bool presence)
void | libdar::header_version::set_signed (bool is_signed)
void | libdar::header_version::set_salt (const std::string &arg)
void | libdar::header_version::set_iteration_count (const infinint &arg)
void | libdar::header_version::set_kdf_hash (hash_algo algo)
void | libdar::header_version::set_compression_block_size (const infinint &bs)
const archive_version & | libdar::header_version::get_edition () const
compression | libdar::header_version::get_compression_algo () const
const std::string & | libdar::header_version::get_command_line () const
const infinint & | libdar::header_version::get_initial_offset () const
bool | libdar::header_version::is_ciphered () const
bool | libdar::header_version::is_signed () const
crypto_algo | libdar::header_version::get_sym_crypto_algo () const
std::string | libdar::header_version::get_sym_crypto_name () const
std::string | libdar::header_version::get_asym_crypto_name () const
memory_file * | libdar::header_version::get_crypted_key () const
const slice_layout * | libdar::header_version::get_slice_layout () const
bool | libdar::header_version::get_tape_marks () const
const std::string & | libdar::header_version::get_salt () const
const infinint & | libdar::header_version::get_iteration_count () const
hash_algo | libdar::header_version::get_kdf_hash () const
const infinint & | libdar::header_version::get_compression_block_size () const
void | libdar::header_version::display (user_interaction &dialg) const
void | libdar::header_version::clear ()
void | libdar::header_version::nullifyptr () noexcept
void | libdar::header_version::copy_from (const header_version &ref)
void | libdar::header_version::move_from (header_version &&ref) noexcept
void | libdar::header_version::detruit ()
void | libdar::int_tools_swap_bytes (unsigned char &a, unsigned char &b)
void | libdar::int_tools_swap_bytes (unsigned char *a, U_I size)
void | libdar::int_tools_expand_byte (unsigned char a, int_tools_bitfield &bit)
void | libdar::int_tools_contract_byte (const int_tools_bitfield &b, unsigned char &a)
template<class T >
T | libdar::int_tools_rotate_right_one_bit (T v)
template<class T >
T | libdar::int_tools_maxof_aggregate (T unused)
trivial_sar * | libdar::macro_tools_open_archive_tuyau (const std::shared_ptr< user_interaction > &dialog, S_I fd, gf_mode mode, const label &internal_name, const label &data_name, bool slice_header_format_07, const std::string &execute)
| create an container to write an archive to a pipe
void | libdar::macro_tools_open_archive (const std::shared_ptr< user_interaction > &dialog, const std::shared_ptr< entrepot > &where, const std::string &basename, const infinint &min_digits, const std::string &extension, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, pile &stack, header_version &ver, const std::string &input_pipe, const std::string &output_pipe, const std::string &execute, infinint &second_terminateur_offset, bool lax, bool has_external_cat, bool sequential_read, bool info_details, std::list< signator > &gnupg_signed, slice_layout &sl, U_I multi_threaded_crypto, U_I multi_threaded_compress, bool header_only)
| setup the given pile object to contain a stack of generic_files suitable to read an archive
catalogue * | libdar::macro_tools_get_derivated_catalogue_from (const std::shared_ptr< user_interaction > &dialog, pile &data_stack, pile &cata_stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, std::list< signator > &signatories, bool lax_mode)
| uses terminator to skip to the position where to find the catalogue and read it, taking care of having this catalogue pointing to the real data (context of isolated catalogue — cata_stack — used to rescue an internal archive — data_stack)
catalogue * | libdar::macro_tools_get_catalogue_from (const std::shared_ptr< user_interaction > &dialog, pile &stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, std::list< signator > &signatories, bool lax_mode)
| uses terminator to skip to the position where to find the catalogue and read it
catalogue * | libdar::macro_tools_read_catalogue (const std::shared_ptr< user_interaction > &dialog, const header_version &ver, const pile_descriptor &cata_pdesc, const infinint &cat_size, std::list< signator > &signatories, bool lax_mode, const label &lax_layer1_data_name, bool only_detruits)
| read the catalogue from cata_stack assuming the cata_stack is positionned at the beginning of the area containing archive's dumped data
catalogue * | libdar::macro_tools_lax_search_catalogue (const std::shared_ptr< user_interaction > &dialog, pile &stack, const archive_version &edition, compression compr_algo, bool info_details, bool even_partial_catalogues, const label &layer1_data_name)
infinint | libdar::macro_tools_get_terminator_start (generic_file &f, const archive_version &reading_ver)
void | libdar::macro_tools_create_layers (const std::shared_ptr< user_interaction > &dialog, pile &layers, header_version &ver, slice_layout &slicing, const slice_layout *ref_slicing, const std::shared_ptr< entrepot > &sauv_path_t, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, const infinint &pause, compression algo, U_I compression_level, U_I compression_block_size, const infinint &file_size, const infinint &first_file_size, const std::string &execute, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, bool empty, const std::string &slice_permission, bool add_marks_for_sequential_reading, const std::string &user_comment, hash_algo hash, const infinint &slice_min_digits, const label &internal_name, const label &data_name, const infinint &iteration_count, hash_algo kdf_hash, U_I multi_threaded_crypto, U_I multi_threaded_compress)
| build layers for a new archive
void | libdar::macro_tools_close_layers (const std::shared_ptr< user_interaction > &dialog, pile &layers, const header_version &ver, const catalogue &cat, bool info_details, crypto_algo crypto, compression algo, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, bool empty)
| dumps the catalogue and close all the archive layers to terminate the archive
range | libdar::macro_tools_get_slices (const cat_nomme *obj, slice_layout sl)
| gives the location of data EA and FSA (when they are saved) of the object given in argument
void | libdar::macro_tools_open_pipes (const std::shared_ptr< user_interaction > &dialog, const std::string &input, const std::string &output, tuyau *&in, tuyau *&out)
| open a pair of tuyau objects encapsulating two named pipes.
proto_compressor * | libdar::macro_tools_build_streaming_compressor (compression algo, generic_file &base, U_I compression_level, U_I num_workers)
| return a proto_compressor object realizing the desired (de)compression level/aglo on top of "base" in streaming mode
proto_compressor * | libdar::macro_tools_build_block_compressor (compression algo, generic_file &base, U_I compression_level, U_I num_workers, U_I block_size)
| return a proto_compressor object realizing the desired (de)compression level/algo on to of "base" in block mode
over_action_ea | libdar::op_tools_crit_ask_user_for_EA_action (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| ask user for EA action
over_action_ea | libdar::op_tools_crit_ask_user_for_FSA_action (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| ask user for FSA action
over_action_data | libdar::op_tools_crit_ask_user_for_data_action (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| ask user for Data action
void | libdar::op_tools_crit_show_entry_info (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| show information suited for user comparison and decision for entry in conflict
std::string | libdar::sar_tools_make_filename (const std::string &base_name, const infinint &num, const infinint &min_digits, const std::string &ext)
bool | libdar::sar_tools_extract_num (const std::string &filename, const std::string &base_name, const infinint &min_digits, const std::string &ext, infinint &ret)
bool | libdar::sar_tools_get_higher_number_in_dir (user_interaction &ui, entrepot &entr, const std::string &base_name, const infinint &min_digits, const std::string &ext, infinint &ret)
void | libdar::sar_tools_remove_higher_slices_than (entrepot &entr, const std::string &base_name, const infinint &min_digits, const std::string &ext, const infinint &higher_slice_num_to_keep, user_interaction &ui)
std::string | libdar::sar_tools_make_padded_number (const std::string &num, const infinint &min_digits)
void | libdar::tools_init ()
| libdar internal use only: it is launched from get_version() and initializes tools internal variables
void | libdar::tools_end ()
| libdar internal use only: it is launched from close_and_clean() and releases tools internal variables
void | libdar::tools_write_string (generic_file &f, const std::string &s)
| write a string to a file with a '\0' at then end
void | libdar::tools_read_string (generic_file &f, std::string &s)
| read a string from a file expecting it to terminate by '\0'
void | libdar::tools_write_string_all (generic_file &f, const std::string &s)
| write a string to a file, '\0' has no special meaning nor is added at the end
void | libdar::tools_read_string_size (generic_file &f, std::string &s, infinint taille)
| read a string if given size from a file '\0' has no special meaning
infinint | libdar::tools_get_filesize (const path &p)
| retrieve the size in byte of a file
std::string | libdar::tools_display_integer_in_metric_system (infinint number, const std::string &unit, bool binary)
std::string::iterator | libdar::tools_find_last_char_of (std::string &s, unsigned char v)
| give a pointer to the last character of the given value in the given string
void | libdar::tools_blocking_read (int fd, bool mode)
| set blocking/not blocking mode for reading on a file descriptor
std::string | libdar::tools_name_of_uid (const infinint &uid)
| convert uid to name in regards to the current system's configuration
std::string | libdar::tools_name_of_gid (const infinint &gid)
| convert gid to name in regards of the current system's configuration
std::string | libdar::tools_uword2str (U_16 x)
| convert unsigned word to string
std::string | libdar::tools_int2str (S_I x)
| convert integer to string
std::string | libdar::tools_uint2str (U_I x)
std::string | libdar::tools_addspacebefore (std::string s, U_I expected_size)
| prepend spaces before the given string
std::string | libdar::tools_display_date (const datetime &date)
| convert a date in second to its human readable representation
char * | libdar::tools_str2charptr (const std::string &x)
| convert a string to a char *
U_I | libdar::tools_str2int (const std::string &x)
| convert an integer written in decimal notation to the corresponding value
void | libdar::tools_system (user_interaction &dialog, const std::vector< std::string > &argvector)
| wrapper to the "system" system call.
void | libdar::tools_system_with_pipe (const std::shared_ptr< user_interaction > &dialog, const std::string &dar_cmd, const std::vector< std::string > &argvpipe)
| wrapper to the "system" system call using anonymous pipe to tranmit arguments to the child process
void | libdar::tools_write_vector (generic_file &f, const std::vector< std::string > &x)
| write a list of string to file
void | libdar::tools_read_vector (generic_file &f, std::vector< std::string > &x)
| read a list of string from a file
std::string | libdar::tools_concat_vector (const std::string &separator, const std::vector< std::string > &x)
| concatenate a vectors of strings in a single string
std::vector< std::string > | libdar::operator+ (std::vector< std::string > a, std::vector< std::string > b)
| concatenate two vectors
bool | libdar::tools_is_equal_with_hourshift (const infinint &hourshift, const datetime &date1, const datetime &date2)
| test if two dates are equal taking care of a integer hour of difference
template<class T >
std::vector< T > | libdar::operator+= (std::vector< T > &a, const std::vector< T > &b)
| template function to add two vectors
std::string | libdar::tools_readlink (const char *root)
| returns the file pointed to by a symbolic link (or transparent if the file is not a symlink).
void | libdar::tools_noexcept_make_date (const std::string &chem, bool symlink, const datetime &last_acc, const datetime &last_mod, const datetime &birth)
| set dates of a given file, no exception thrown
void | libdar::tools_make_date (const std::string &chemin, bool symlink, const datetime &access, const datetime &modif, const datetime &birth)
| set dates of a given file, may throw exception
bool | libdar::tools_is_case_insensitive_equal (const std::string &a, const std::string &b)
| compare two string in case insensitive manner
void | libdar::tools_to_upper (const std::string &r, std::string &uppered)
| convert a string to upper case
std::string | libdar::tools_printf (const char *format,...)
| make printf-like formating to a std::string
std::string | libdar::tools_vprintf (const char *format, va_list ap)
| make printf-like formating to a std::string
bool | libdar::tools_do_some_files_match_mask_regex (const entrepot &ent, const std::string &file_mask)
| test the presence of files corresponding to a given mask in a directory (regex mask)
void | libdar::tools_unlink_file_mask_regex (user_interaction &dialog, const entrepot &ent, const std::string &file_mask, bool info_details)
| remove files from a given directory
void | libdar::tools_avoid_slice_overwriting_regex (user_interaction &dialog, const entrepot &ent, const std::string &basename, const std::string &extension, bool info_details, bool allow_overwriting, bool warn_overwriting, bool dry_run)
| prevents slice overwriting: check the presence of slice and if necessary ask the user if they can be removed
bool | libdar::tools_are_on_same_filesystem (const std::string &file1, const std::string &file2)
| tells whether two files are on the same mounted filesystem
path | libdar::tools_relative2absolute_path (const path &src, const path &cwd)
| transform a relative path to an absolute one given the current directory value
void | libdar::tools_block_all_signals (sigset_t &old_mask)
| block all signals (based on POSIX sigprocmask)
void | libdar::tools_set_back_blocked_signals (sigset_t old_mask)
| unblock signals according to given mask
U_I | libdar::tools_count_in_string (const std::string &s, const char a)
| counts the number of a given char in a given string
datetime | libdar::tools_get_mtime (user_interaction &dialog, const std::string &s, bool auto_zeroing, bool silent, const std::set< std::string > &ignored_as_symlink=std::set< std::string >())
| returns the last modification date of the given file
infinint | libdar::tools_get_size (const std::string &s)
| returns the size of the given plain file
infinint | libdar::tools_get_extended_size (std::string s, U_I base)
| convert the given string to infinint taking care of multiplication suffixes like k, M, T, etc.
std::string | libdar::tools_substitute (const std::string &hook, const std::map< char, std::string > &corres)
| produce the string resulting from the substition of % macro defined in the map
std::string | libdar::tools_hook_substitute (const std::string &hook, const std::string &path, const std::string &basename, const std::string &num, const std::string &padded_num, const std::string &ext, const std::string &context, const std::string &base_url)
| produces the string resulting from the substitution of %... macro
void | libdar::tools_hook_execute (user_interaction &ui, const std::string &cmd_line)
| execute and retries at user will a given command line
void | libdar::tools_hook_substitute_and_execute (user_interaction &ui, const std::string &hook, const std::string &path, const std::string &basename, const std::string &num, const std::string &padded_num, const std::string &ext, const std::string &context, const std::string &base_url)
| subsititue and execute command line
std::string | libdar::tools_output2xml (const std::string &src)
| convert string for xml output
U_I | libdar::tools_octal2int (const std::string &perm)
| convert octal string to integer
std::string | libdar::tools_int2octal (const U_I &perm)
| convert a number to a string corresponding to its octal representation
char | libdar::tools_cast_type_to_unix_type (char type)
| change the libdar internal type representation to the usual unix char type
std::string | libdar::tools_get_permission_string (char type, U_32 perm, bool hard)
| convert a permission number into its string representation (rwxrwxrwx)
void | libdar::tools_set_permission (S_I fd, U_I perm)
| change the permission of the file which descriptor is given
U_I | libdar::tools_get_permission (S_I fd)
| obtain the permission of the file which descriptor is given
uid_t | libdar::tools_ownership2uid (const std::string &user)
| change ownership of the file which descriptor is given
uid_t | libdar::tools_ownership2gid (const std::string &group)
| convert string group name or gid to numeric gid value
void | libdar::tools_set_ownership (S_I filedesc, const std::string &slice_user, const std::string &slice_group)
| change ownership of the file which descriptor is given
void | libdar::tools_memxor (void *dest, const void *src, U_I n)
| Produces in "dest" the XORed value of "dest" and "src".
tlv_list | libdar::tools_string2tlv_list (user_interaction &dialog, const U_16 &type, const std::vector< std::string > &data)
| Produces a list of TLV from a constant type and a list of string.
U_I | libdar::tools_pseudo_random (U_I max)
| Produces a pseudo random number x, where 0 <= x < max.
template<class N , class B >
std::deque< B > | libdar::tools_number_base_decomposition_in_big_endian (N number, const B &base)
| Template for the decomposition of any number in any base (decimal, octal, hexa, etc.)
std::string | libdar::tools_unsigned_char_to_hexa (unsigned char x)
| convert a unsigned char into its hexa decima representation
std::string | libdar::tools_string_to_hexa (const std::string &input)
| convert a string into its hexadecima representation
infinint | libdar::tools_file_size_to_crc_size (const infinint &size)
| Defines the CRC size to use for a given filesize.
std::string | libdar::tools_getcwd ()
| get current working directory
std::string | libdar::tools_get_compression_ratio (const infinint &storage_size, const infinint &file_size, bool compressed)
| return the string about compression ratio
std::string | libdar::tools_strerror_r (int errnum)
| wrapper routine to strerror_r
void | libdar::tools_secu_string_show (user_interaction &dialog, const std::string &msg, const secu_string &key)
| display the content of a secu_string, this function is only for trouble shooting!
template<class T >
T | libdar::tools_max (T a, T b)
template<class T >
T | libdar::tools_min (T a, T b)
void | libdar::tools_unlink (const std::string &filename)
| remove from filesystem the file which path is given
std::string | libdar::tools_escape_chars_in_string (const std::string &val, const char *to_escape)
| escape with a anti-slash character a set of chars found in the given string
bool | libdar::tools_infinint2U_64 (infinint val, U_64 &res)
| convert an infinint to U_64 (aka "uint64_t" or yet "unsigned long long")
bool | libdar::tools_my_atoi (const char *a, U_I &val)
| ascii to integer conversion
infinint | libdar::tools_double2infinint (double arg)
| convert a double (float) to infinint (integer) taking care of rounding it to the closest value
template<class T >
void | libdar::tools_check_negative_date (T &val, user_interaction &ui, const char *inode_path, const char *nature, bool ask_before, bool silent)
| check the value is not negative, and if asked set it to zero
infinint | libdar::tools_upper_rounded_log2 (const infinint &ref)
| compute an approximate log2 of the argument
infinint | libdar::tools_lower_rounded_exp2 (const infinint &ref)
| compute an approximate exp2 of the argument
infinint | libdar::tools_rounded_square_root (const infinint &ref)
| compute an approximate square root of the argument
infinint | libdar::tools_rounded_cube_root (const infinint &ref)
| compute an approximate cube root of the argument
std::string | libdar::sar_make_filename (const std::string &base_name, const infinint &num, const infinint &min_digits, const std::string &ext)
| return the name of a slice given the base_name, slice number and extension
std::unique_ptr< T > | libdar::heap< T >::get ()
void | libdar::heap< T >::put (std::unique_ptr< T > &&obj)
void | libdar::heap< T >::put (std::deque< std::unique_ptr< T > > &list)
template<class T >
bool | libdar::pile::pop_and_close_if_type_is (T *ptr)
| remove the top generic_file and destroy it
template<class T >
void | libdar::pile::find_first_from_top (T *&ref) const
| this template let the class user find out the higher object on the stack of the given type
template<class T >
void | libdar::pile::find_first_from_bottom (T *&ref) const
| this template is similar to the template "find_first_from_top" except that the search is started from the bottom of the stack
void | libdar::storage::iterator::skip_plus_one ()
void | libdar::storage::iterator::skip_less_one ()

## Variables
const U_32 | libdar::SAUV_MAGIC_NUMBER = 123
U_I | libdar::header_flags::bits
| future implementation could rely on infinint for a arbitrary large bitfield
archive_version | libdar::header_version::edition
| archive format
compression | libdar::header_version::algo_zip
| compression algorithm used
std::string | libdar::header_version::cmd_line
| used long ago to store cmd_line, then abandonned, then recycled as a user comment field
infinint | libdar::header_version::initial_offset
| defines at which offset starts the archive (passed the archive header), this field is obiously only used in the trailer not in the header
crypto_algo | libdar::header_version::sym
| strong encryption algorithm used for symmetrical encryption
memory_file * | libdar::header_version::crypted_key
| optional field containing the asymmetrically ciphered key used for strong encryption ciphering
slice_layout * | libdar::header_version::ref_layout
| optional field used in isolated catalogues to record the slicing layout of their archive of reference
bool | libdar::header_version::has_tape_marks
| whether the archive contains tape marks aka escape marks aka sequence marks
bool | libdar::header_version::ciphered
| whether the archive is ciphered, even if we do not know its crypto algorithm (old archives)
bool | libdar::header_version::arch_signed
| whether the archive is signed
bool | libdar::header_version::has_kdf_params
| has salt/ineration/kdf_hash fields valid
std::string | libdar::header_version::salt
| used for key derivation
infinint | libdar::header_version::iteration_count
| used for key derivation
hash_algo | libdar::header_version::kdf_hash
| used for key derivation
infinint | libdar::header_version::compr_bs
| the compression block size (0 for legacy compression mode)
static constexpr U_I | libdar::header_version::PRE_FORMAT_10_ITERATION = 2000
| fixed value used for key derivation before archive format 10
const label | libdar::label_zero
constexpr U_I | libdar::GLOBAL_ELASTIC_BUFFER_SIZE = 51200
const archive_version | libdar::macro_tools_supported_version
const std::string | libdar::LIBDAR_STACK_LABEL_UNCOMPRESSED
const std::string | libdar::LIBDAR_STACK_LABEL_CLEAR
const std::string | libdar::LIBDAR_STACK_LABEL_UNCYPHERED
const std::string | libdar::LIBDAR_STACK_LABEL_LEVEL1
constexpr const U_I | libdar::default_uncompressed_block_size = 102400
constexpr const U_I | libdar::min_uncompressed_block_size = 100
const int | libdar::WR_OK = 0
const int | libdar::WR_MEM_ERROR = 1
const int | libdar::WR_VERSION_ERROR = 2
const int | libdar::WR_STREAM_ERROR = 3
const int | libdar::WR_DATA_ERROR = 4
const int | libdar::WR_NO_FLUSH = 5
const int | libdar::WR_BUF_ERROR = 6
const int | libdar::WR_STREAM_END = 7
const int | libdar::WR_FINISH = 8
constexpr unsigned char | libdar::ANSWER_TYPE_DATA = 'D'
constexpr unsigned char | libdar::ANSWER_TYPE_INFININT = 'I'
constexpr U_I | libdar::REQUEST_SIZE_SPECIAL_ORDER = 0
constexpr U_I | libdar::REQUEST_OFFSET_END_TRANSMIT = 0
constexpr U_I | libdar::REQUEST_OFFSET_GET_FILESIZE = 1
constexpr U_I | libdar::REQUEST_OFFSET_CHANGE_CONTEXT_STATUS = 2
constexpr U_I | libdar::REQUEST_IS_OLD_START_END_ARCHIVE = 3
constexpr U_I | libdar::REQUEST_GET_DATA_NAME = 4
constexpr U_I | libdar::REQUEST_FIRST_SLICE_HEADER_SIZE = 5
constexpr U_I | libdar::REQUEST_OTHER_SLICE_HEADER_SIZE = 6

## Detailed Description

Libdar internal symbols.

Understanding this is not necessary to use libdar through the API. This is libdar internal code documentation

## Macro Definition Documentation

## ◆ O_BINARY

#define O_BINARY 0

Definition at line 47 of file cygwin_adapt.h.

## ◆ O_TEXT

#define O_TEXT 0

Definition at line 42 of file cygwin_adapt.h.

## Typedef Documentation

## ◆ int_tools_bitfield

using libdar::int_tools_bitfield = unsigned char[8]

Definition at line 40 of file int_tools.hpp.

## ◆ magic_number

using libdar::magic_number = U_32

Definition at line 46 of file header.hpp.

## ◆ trailing_clear_data_callback

typedef infinint(* libdar::trailing_clear_data_callback) (generic_file &below, const archive_version &reading_ver)

the trailing_clear_data_callback call back is a mean by which the upper layer cat tell when encrypted data ends

Parameters

  [in] | below | is the generic_file containing the encrypted data that the proto_tronco inherited class is willing to decipher.
  [in] | reading_ver | is the archive format version of the archive under operation

Returns
  the callback returns the offset of the first non encrypted data at the end of the provided generic_file.

Note
  this method should be invoked when decryption failed at or near end of file.
  the libdar archive format is ended by a clear trailier which is expected to be read backward, by the end of the archive. The last part of this trailer (see terminateur class) records the offset of the beginning of this trailier (which are all clear clear), it is thus possible outside of the encrypted layer to tail the clear data from the encrypted one and avoid trying to decipher data that is not encrypted. This is the reason of existence for this callback.

Definition at line 58 of file proto_tronco.hpp.

## Enumeration Type Documentation

## ◆ capa_status

enum libdar::capa_status

the EFFECTIVE set the value of the associated capability for the calling thread

returned by the capability_* routines

Enumerator
capa_set | current thread has the requested capability
capa_clear | current thread has not the requested capability

Definition at line 41 of file capabilities.hpp.

## ◆ compressor_block_flags

enum class libdar::compressor_block_flags
| strong

the different flags used to communicate between threads hold by parallel_block_compressor class

Definition at line 121 of file parallel_block_compressor.hpp.

## ◆ ea_saved_status

enum class libdar::ea_saved_status
| strong

EA saved status for an entry.

Enumerator
none | no EA present for this inode in filesystem
partial | EA present in filesystem but not stored (ctime used to check changes)
fake | EA present in filesystem but not attached to this inode (isolation context) no more used in archive version "08" and above, ea_partial or ea_full stays a valid status in isolated catalogue because pointers to EA and data are no more removed during isolation process.
full | EA present in filesystem and attached to this inode.
removed | EA were present in the reference version, but not present anymore.

Definition at line 55 of file cat_status.hpp.

## ◆ elastic_direction

enum libdar::elastic_direction

reading direction of an elastic buffer

Definition at line 44 of file elastic.hpp.

## ◆ flag_type

enum libdar::flag_type

Definition at line 48 of file header.hpp.

## ◆ fsa_saved_status

enum class libdar::fsa_saved_status
| strong

FSA saved status for an entry.

there is not "remove status for FSA, either the cat_inode contains full copy of FSA or only remembers the families of FSA found in the unchanged cat_inode FSA none is used when the file has no FSA because:

- either the underlying filesystem has no known FSA
- or the underlying filesystem FSA support has not been activated at compilation time
- or the fsa_scope requested at execution time exclude the filesystem FSA families available here

Enumerator
none | no FSA saved
partial | FSA unchanged, not fully stored.
full | FSA saved.

Definition at line 73 of file cat_status.hpp.

## ◆ gf_mode

enum libdar::gf_mode

generic_file openning modes

Enumerator
gf_read_only | read only access
gf_write_only | write only access
gf_read_write | read and write access

Definition at line 43 of file gf_mode.hpp.

## ◆ saved_status

enum class libdar::saved_status
| strong

data saved status for an entry

Enumerator
saved | inode is saved in the archive
inode_only | data is not saved but inode meta data has changed since the archive of reference
fake | inode is not saved in the archive but is in the archive of reference (isolation context) s_fake is no more used in archive format "08" and above: isolated catalogue do keep the data pointers and s_saved stays a valid status in isolated catalogues.
not_saved | inode is not saved in the archive
delta | inode is saved but as delta binary from the content (delta signature) of what was found in the archive of reference

Definition at line 44 of file cat_status.hpp.

## ◆ tronco_flags

enum class libdar::tronco_flags
| strong

status flags used between parallel_tronconneuse and its sub-threads

Definition at line 64 of file parallel_tronconneuse.hpp.

## ◆ wrapperlib_mode

enum libdar::wrapperlib_mode

Definition at line 68 of file wrapperlib.hpp.

## Function Documentation

## ◆ clear()

void libdar::header_flags::clear | ( |  | ) |
| inline

clear all flags

Definition at line 76 of file header_flags.hpp.

References libdar::header_flags::bits.

## ◆ clear_crypted_key()

void libdar::header_version::clear_crypted_key | ( |  | ) |
| inline

Definition at line 73 of file header_version.hpp.

## ◆ clear_slice_layout()

void libdar::header_version::clear_slice_layout | ( |  | ) |
| inline

Definition at line 77 of file header_version.hpp.

## ◆ cloner()

template<class T >

T * libdar::cloner | ( | const T * | x | ) |

Definition at line 248 of file filesystem_specific_attribute.hpp.

## ◆ crypto_min_ver_libgcrypt_no_bug()

bool libdar::crypto_min_ver_libgcrypt_no_bug | ( |  | ) |
| inline

Definition at line 55 of file crypto_sym.hpp.

## ◆ database_header_create()

generic_file * libdar::database_header_create | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const std::string & | filename,
|  | bool | overwrite,
|  | compression | algozip,
|  | U_I | compr_level )
| extern

create the header for a dar_manager database

Parameters

  [in] | dialog | is used for user interaction
  [in] | filename | is the file's name to create/overwrite
  [in] | overwrite | set to true to allow file overwriting (else generates an error if file exists)
  [in] | algozip | compression algorithm used for the database
  [in] | compr_level | compression level

Returns
  the database header has been read and checked the database can now be read from the returned generic_file pointed by the returned value then it must be destroyed with the delete operator.

## ◆ database_header_open()

generic_file * libdar::database_header_open | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const std::string & | filename,
|  | unsigned char & | db_version,
|  | compression & | algozip,
|  | U_I & | compr_level )
| extern

read the header of a dar_manager database

Parameters

  [in] | dialog | for user interaction
  [in] | filename | is the filename to read from
  [out] | db_version | version of the database
  [out] | algozip | compression algorithm used in the database
  [out] | compr_level | compression level used in the database

Returns
  the generic_file where the database header has been put

## ◆ ea_filesystem_clear_ea()

void libdar::ea_filesystem_clear_ea | ( | const std::string & | name,
|  | const mask & | filter )
| extern

remove all EA of a given file that match a given mask

Parameters

  [in] | name | is the filename which EA must be altered
  [in] | filter | is a mask that defines which EA names have to be removed

Note
  unless the given mask is logically equivalent to bool_mask(true) some EA may remain associated to the file after the operation.

## ◆ ea_filesystem_has_ea() [1/2]

bool libdar::ea_filesystem_has_ea | ( | const std::string & | name | ) |
| extern

test the presence of EA for a given file

Parameters

  [in] | name | is the filename which EA presence must be check against

Returns
  true if at least one EA has been found

## ◆ ea_filesystem_has_ea() [2/2]

bool libdar::ea_filesystem_has_ea | ( | const std::string & | name,
|  | const mask & | filter )
| extern

test the presence of EA for a given file

Parameters

  [in] | name | is the filename which EA presence must be check against
  [in] | filter | is a mask that defines which attributes names to only consider

Returns
  true if at least one EA has been found

## ◆ ea_filesystem_read_ea()

ea_attributs * libdar::ea_filesystem_read_ea | ( | const std::string & | chemin,
|  | const mask & | filter )
| extern

read EA associated to a given file

Parameters

  [in] | chemin | is the path to the file to read attributes of
  [in] | filter | is a mask that defines which attributes names have to be considered only

Returns
  nullptr if no EA have been found under the specified mask, or returns a newly allocated object that the caller has the responsibility to delete when no more needed

## ◆ ea_filesystem_write_ea()

bool libdar::ea_filesystem_write_ea | ( | const std::string & | chemin,
|  | const ea_attributs & | val,
|  | const mask & | filter )
| extern

overwrite some attribute to a given file's attribute list

Parameters

  [in] | chemin | is the path of the file to write attribute to
  [in] | val | is a list of attribute amoung which a subset will be added to file's attribute list
  [in] | filter | a mask that define which attribute's names will be written and which will be ignored from the given list

Returns
  true if some attribute could be set

Note
  if an EA is already present, it is not modified unless the mask covers its name and a value is available for that attribute name in the given list.

## ◆ filesystem_tools_create_non_existing_file_based_on()

fichier_local * libdar::filesystem_tools_create_non_existing_file_based_on | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | std::string | filename,
|  | path | where,
|  | std::string & | new_filename )

create in dirname a brand-new filename which name derives from filename

Returns
  a read-write object the caller has the duty to destroy, exception thrown if no filename could be created

## ◆ filesystem_tools_read_linux_birthtime()

bool libdar::filesystem_tools_read_linux_birthtime | ( | const std::string & | target,
|  | datetime & | val )

read the birthtime of target inode

Parameters

  [in] | target | the path the the inode to read the birthtime of
  [out] | val | the birthtime (only valid if the call returned true)

Returns
  true if the birthtime could be read with linux specific systemcall

## ◆ filtre_merge_step0()

void libdar::filtre_merge_step0 | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const catalogue * | ref1,
|  | const catalogue * | ref2,
|  | statistics & | st,
|  | bool | decremental_mode,
|  | crit_action *& | decr,
|  | const crit_action *& | overwrite,
|  | bool & | abort,
|  | thread_cancellation & | thr_cancel )
| extern

initialize variables used for merging in step1 and step2

Note
  also used for repairing

## ◆ filtre_merge_step2()

void libdar::filtre_merge_step2 | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const pile_descriptor & | pdesc,
|  | catalogue & | cat,
|  | bool | info_details,
|  | bool | display_treated,
|  | bool | display_treated_only_dir,
|  | const mask & | compr_mask,
|  | const infinint & | min_compr_size,
|  | bool | keep_compressed,
|  | const infinint & | sparse_file_min_size,
|  | bool | delta_signature,
|  | bool | build_delta_sig,
|  | const infinint & | delta_sig_min_size,
|  | const mask & | delta_mask,
|  | bool & | abort,
|  | thread_cancellation & | thr_cancel,
|  | bool | repair_mode,
|  | const delta_sig_block_size & | signature_block_size )
| extern

copies data of "cat" catalogue to the pdesc of a brand new archive

Note
  also used for repairing

## ◆ filtre_restore()

void libdar::filtre_restore | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const mask & | filtre,
|  | const mask & | subtree,
|  | const catalogue & | cat,
|  | const path & | fs_racine,
|  | bool | fs_warn_overwrite,
|  | bool | info_details,
|  | bool | display_treated,
|  | bool | display_treated_only_dir,
|  | bool | display_skipped,
|  | statistics & | st,
|  | const mask & | ea_mask,
|  | bool | flat,
|  | comparison_fields | what_to_check,
|  | bool | warn_remove_no_match,
|  | bool | empty,
|  | bool | empty_dir,
|  | const crit_action & | x_overwrite,
|  | archive_options_extract::t_dirty | dirty,
|  | bool | only_deleted,
|  | bool | not_deleted,
|  | const fsa_scope & | scope,
|  | bool | ignore_unix_sockets )
| extern

Parameters

  dialog | for user interaction
  filtre | which filename to restore
  subtree | which directory and paths to restore
  cat | table of content to extract information from
  fs_racine | root path under which to restore directiry tree and files
  fs_warn_overwrite | whether to warn before overwriting (to be replaced by overwriting policy)
  info_details | whether to display processing messages
  display_treated | whether to display treated files
  display_treated_only_dir | whether to only display current directory of treated file
  display_skipped | whether to display skipped files
  st | statistics result about the operation
  ea_mask | defines EA to restore/not restore
  flat | if true, directories are not restores, all files are placed directly at in fs_racine directory
  what_to_check | which file properties to restore
  warn_remove_no_match | wether to warn for file to remove not matching the expected type
  empty | dry-run execution
  empty_dir | whether to restore directories that do contain any file to restore
  x_overwrite | how and whether to overwrite files
  dirty | whether to restore dirty files
  only_deleted | whether to only consider deleted files
  not_deleted | wether to consider deleted files
  scope | scope of FSA to take into account
  ignore_unix_sockets | do not try to restore unix sockets

## ◆ find_first_from_bottom()

template<class T >

void libdar::pile::find_first_from_bottom | ( | T *& | ref | ) | const

this template is similar to the template "find_first_from_top" except that the search is started from the bottom of the stack

Definition at line 212 of file pile.hpp.

## ◆ find_first_from_top()

template<class T >

void libdar::pile::find_first_from_top | ( | T *& | ref | ) | const

this template let the class user find out the higher object on the stack of the given type

Parameters

  [in,out] | ref | gives the type of the object to look for, and gets the address of the first object found starting from the top

Note
  if no object of that type could be found in the stack ref is set to nullptr

Definition at line 204 of file pile.hpp.

## ◆ get()

template<class T >

std::unique_ptr< T > libdar::heap< T >::get | ( |  | ) |

Definition at line 69 of file heap.hpp.

## ◆ get_command_line()

const std::string & libdar::header_version::get_command_line | ( |  | ) | const
| inline

Definition at line 92 of file header_version.hpp.

## ◆ get_compression_algo()

compression libdar::header_version::get_compression_algo | ( |  | ) | const
| inline

Definition at line 91 of file header_version.hpp.

## ◆ get_compression_block_size()

const infinint & libdar::header_version::get_compression_block_size | ( |  | ) | const
| inline

Definition at line 106 of file header_version.hpp.

## ◆ get_crypted_key()

memory_file * libdar::header_version::get_crypted_key | ( |  | ) | const
| inline

Definition at line 100 of file header_version.hpp.

## ◆ get_edition()

const archive_version & libdar::header_version::get_edition | ( |  | ) | const
| inline

Definition at line 90 of file header_version.hpp.

## ◆ get_initial_offset()

const infinint & libdar::header_version::get_initial_offset | ( |  | ) | const
| inline

Definition at line 93 of file header_version.hpp.

## ◆ get_iteration_count()

const infinint & libdar::header_version::get_iteration_count | ( |  | ) | const
| inline

Definition at line 104 of file header_version.hpp.

## ◆ get_kdf_hash()

hash_algo libdar::header_version::get_kdf_hash | ( |  | ) | const
| inline

Definition at line 105 of file header_version.hpp.

## ◆ get_salt()

const std::string & libdar::header_version::get_salt | ( |  | ) | const
| inline

Definition at line 103 of file header_version.hpp.

## ◆ get_slice_layout()

const slice_layout * libdar::header_version::get_slice_layout | ( |  | ) | const
| inline

Definition at line 101 of file header_version.hpp.

## ◆ get_sym_crypto_algo()

crypto_algo libdar::header_version::get_sym_crypto_algo | ( |  | ) | const
| inline

Definition at line 97 of file header_version.hpp.

## ◆ get_tape_marks()

bool libdar::header_version::get_tape_marks | ( |  | ) | const
| inline

Definition at line 102 of file header_version.hpp.

## ◆ header_flags() [1/2]

libdar::header_flags::header_flags | ( |  | ) |
| inline

Definition at line 52 of file header_flags.hpp.

## ◆ header_flags() [2/2]

libdar::header_flags::header_flags | ( | generic_file & | f | ) |
| inline

Definition at line 53 of file header_flags.hpp.

## ◆ header_version() [1/2]

libdar::header_version::header_version | ( | const header_version & | ref | ) |
| inline

Definition at line 51 of file header_version.hpp.

## ◆ header_version() [2/2]

libdar::header_version::header_version | ( | header_version && | ref | ) |
| inline noexcept

Definition at line 52 of file header_version.hpp.

## ◆ int_tools_maxof_aggregate()

template<class T >

T libdar::int_tools_maxof_aggregate | ( | T | unused | ) |
| extern

Definition at line 60 of file int_tools.hpp.

## ◆ int_tools_rotate_right_one_bit()

template<class T >

T libdar::int_tools_rotate_right_one_bit | ( | T | v | ) |
| extern

Definition at line 49 of file int_tools.hpp.

## ◆ is_all_cleared()

bool libdar::header_flags::is_all_cleared | ( |  | ) |
| inline

whether all bits are cleared

Definition at line 79 of file header_flags.hpp.

References libdar::header_flags::bits.

## ◆ is_ciphered()

bool libdar::header_version::is_ciphered | ( |  | ) | const
| inline

Definition at line 95 of file header_version.hpp.

## ◆ is_signed()

bool libdar::header_version::is_signed | ( |  | ) | const
| inline

Definition at line 96 of file header_version.hpp.

## ◆ macro_tools_build_block_compressor()

proto_compressor * libdar::macro_tools_build_block_compressor | ( | compression | algo,
|  | generic_file & | base,
|  | U_I | compression_level,
|  | U_I | num_workers,
|  | U_I | block_size )
| extern

return a proto_compressor object realizing the desired (de)compression level/algo on to of "base" in block mode

Parameters

  [in] | algo | the compression algorithm to use
  [in,out] | base | the layer to read from or write to compressed data
  [in] | compression_level | the compression level to use (when compressing data)
  [in] | num_workers | for the few algorithm that allow multi-thread compression (lz4 actually)
  [in] | block_size | size of the data block

## ◆ macro_tools_build_streaming_compressor()

proto_compressor * libdar::macro_tools_build_streaming_compressor | ( | compression | algo,
|  | generic_file & | base,
|  | U_I | compression_level,
|  | U_I | num_workers )
| extern

return a proto_compressor object realizing the desired (de)compression level/aglo on top of "base" in streaming mode

Parameters

  [in] | algo | the compression algorithm to use
  [in,out] | base | the layer to read from or write to compressed data
  [in] | compression_level | the compression level to use (when compressing data)
  [in] | num_workers | for the few algorithm that allow multi-thread compression (lz4 actually)

## ◆ macro_tools_close_layers()

void libdar::macro_tools_close_layers | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | pile & | layers,
|  | const header_version & | ver,
|  | const catalogue & | cat,
|  | bool | info_details,
|  | crypto_algo | crypto,
|  | compression | algo,
|  | const std::vector< std::string > & | gnupg_recipients,
|  | const std::vector< std::string > & | gnupg_signatories,
|  | bool | empty )
| extern

dumps the catalogue and close all the archive layers to terminate the archive

Parameters

  [in] | dialog | for user interaction
  [in] | layers | the archive layers to close
  [in] | ver | the archive "header" to be dropped at end of archive
  [in] | cat | the catalogue to dump in the layer before closing the archive
  [in] | info_details | whether to display detailed information
  [in] | crypto | cipher algorithm used in "layers"
  [in] | gnupg_recipients | used sign the catalog, use an empty vector if there is no signatories (no nedd to sign the hash of the catalogue)
  [in] | gnupg_signatories | used to sign the catalog, use an empty vector to disable signning
  [in] | algo | compression algorithm used
  [in] | empty | dry-run execution (null_file at bottom of the stack)

## ◆ macro_tools_create_layers()

void libdar::macro_tools_create_layers | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | pile & | layers,
|  | header_version & | ver,
|  | slice_layout & | slicing,
|  | const slice_layout * | ref_slicing,
|  | const std::shared_ptr< entrepot > & | sauv_path_t,
|  | const std::string & | filename,
|  | const std::string & | extension,
|  | bool | allow_over,
|  | bool | warn_over,
|  | bool | info_details,
|  | const infinint & | pause,
|  | compression | algo,
|  | U_I | compression_level,
|  | U_I | compression_block_size,
|  | const infinint & | file_size,
|  | const infinint & | first_file_size,
|  | const std::string & | execute,
|  | crypto_algo | crypto,
|  | const secu_string & | pass,
|  | U_32 | crypto_size,
|  | const std::vector< std::string > & | gnupg_recipients,
|  | const std::vector< std::string > & | gnupg_signatories,
|  | bool | empty,
|  | const std::string & | slice_permission,
|  | bool | add_marks_for_sequential_reading,
|  | const std::string & | user_comment,
|  | hash_algo | hash,
|  | const infinint & | slice_min_digits,
|  | const label & | internal_name,
|  | const label & | data_name,
|  | const infinint & | iteration_count,
|  | hash_algo | kdf_hash,
|  | U_I | multi_threaded_crypto,
|  | U_I | multi_threaded_compress )
| extern

build layers for a new archive

Parameters

  [in] | dialog | for user interaction
  [out] | layers | the resulting stack of generic_file layers ready for use
  [out] | ver | the archive "header/trailer" to be dropped at beginning and end of archive
  [out] | slicing | slicing layout of the created archive (resulting from sar layers if present according to the provided first/file_size provided below)
  [in] | ref_slicing | if not nullptr the pointed to slicing_layout will be stored in the header/trailer version of the archive
  [in] | sauv_path_t | where to create the archive
  [in] | filename | archive base name
  [in] | extension | archive extension
  [in] | allow_over | whether to allow slice overwriting
  [in] | warn_over | whether to warn before overwriting
  [in] | info_details | whether to display detailed information
  [in] | pause | how many slices to wait before pausing (0 to never wait)
  [in] | algo | compression algorithm
  [in] | compression_level | compression level
  [in] | compression_block_size | if set to zero use streaming compression else use block compression of the given size
  [in] | file_size | size of the slices
  [in] | first_file_size | size of the first slice
  [in] | execute | command to execute after each slice creation
  [in] | crypto | cipher algorithm to use
  [in] | pass | password/passphrase to use for encryption
  [in] | crypto_size | size of crypto blocks
  [in] | gnupg_recipients | list of email recipients'public keys to encrypt a randomly chosen key with
  [in] | gnupg_signatories | list of email which associated signature has to be used to sign the archive
  [in] | empty | dry-run execution (null_file at bottom of the stack)
  [in] | slice_permission | permission to set the slices to
  [in] | add_marks_for_sequential_reading | whether to add an escape layer in the stack
  [in] | user_comment | user comment to add into the slice header/trailer
  [in] | hash | algorithm to use for slices hashing
  [in] | slice_min_digits | minimum number of digits slice number must have
  [in] | internal_name | common label to all slices
  [in] | data_name | to use in slice header
  [in] | iteration_count | used for key derivation when passphrase is human provided
  [in] | kdf_hash | hash algorithm used for the key derivation function
  [in] | multi_threaded_crypto | number of worker threads to handle cryptography stuff
  [in] | multi_threaded_compress | number of worker threads to handle compression (block mode only)

Note
  the stack has the following contents depending on given options

+-top LIBDAR_STACK_LABEL_ +------------------------------------------------------—+------------------—+ | compressor | | +------------------------------------------------------—+------------------—+ | [ escape ] | | +– - - - - - - - - - - - - - - - - - - - - - - - - - - - +------------------—+ | cache | (paralle_)tronconneuse | scrambler | | | [ cache ] |_CACHE_PIPE | | trivial_sar | null_file | sar | | +------------------------------------------------------—+------------------—+ +-bottom

Note
  the bottom cache layer is only present when trivial_sar is used to write on a pipe. trivial_sar used to write a non sliced archive does not use a cache layer above it
  the top cache is only used in place of crypto_sym or scrambler when no encryption is required and the cache layer labelled _CACHE_PIPE is absent.
  escape layer is present by default unless tape marks have been disabled
  the generic_thread are inserted in the stack if multi-threading is possible and allowed

## ◆ macro_tools_get_slices()

range libdar::macro_tools_get_slices | ( | const cat_nomme * | obj,
|  | slice_layout | sl )
| extern

gives the location of data EA and FSA (when they are saved) of the object given in argument

Parameters

  [in] | obj | a pointer to the object which data & EFSA is to be located
  [in] | sl | slice layout of the archive

Returns
  a set of slices which will be required to restore that particular file (over the slice(s) containing the catalogue of course).

## ◆ macro_tools_open_archive()

void libdar::macro_tools_open_archive | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const std::shared_ptr< entrepot > & | where,
|  | const std::string & | basename,
|  | const infinint & | min_digits,
|  | const std::string & | extension,
|  | crypto_algo | crypto,
|  | const secu_string & | pass,
|  | U_32 | crypto_size,
|  | pile & | stack,
|  | header_version & | ver,
|  | const std::string & | input_pipe,
|  | const std::string & | output_pipe,
|  | const std::string & | execute,
|  | infinint & | second_terminateur_offset,
|  | bool | lax,
|  | bool | has_external_cat,
|  | bool | sequential_read,
|  | bool | info_details,
|  | std::list< signator > & | gnupg_signed,
|  | slice_layout & | sl,
|  | U_I | multi_threaded_crypto,
|  | U_I | multi_threaded_compress,
|  | bool | header_only )
| extern

setup the given pile object to contain a stack of generic_files suitable to read an archive

Note
  the stack has the following contents depending on given options

+-top LIBDAR_STACK_LABEL_ +----------------------------------------------------—+------------------—+ | compressor |v v v | +----------------------------------------------------—+------------------—+ | [ escape ] |v v v | +----------------------------------------------------—+v—v—v---------—+ | [ cache ] | (parallel_)tronconneuse | scrambler |v v v | | [ tronc ] |LEVEL 1 | | trivial_sar | zapette | sar |v v v | +----------------------------------------------------—+------------------—+ +-bottom

Note
  escape is present unless tape mark have been disabled at archive creation time
  tronc is not present in sequential read mode
  cache layer is present only in absence of encryption and when no escape layer is above
  _UNCOMPRESSED label is associated to the top of the stack
  _CLEAR is associated to the generic_thread below compressor else escape else the cache or crypto_sym or scrambler which then has two Labels (_CLEAR and _UNCYPHERED)

Parameters

  dialog | for user interaction
  where | slices location
  basename | slice basename
  min_digits | minimum digits for the slice number
  extension | slice extensions
  crypto | encryption algorithm
  pass | pass key for crypto/scrambling
  crypto_size | crypto block size
  stack | the stack of generic_file resulting of the archive openning
  ver | header read from raw data
  input_pipe | named pipe for input when basename is "-" (dar_slave)
  output_pipe | named pipe for output when basename is "-" (dar_slave)
  execute | command to execute between slices
  second_terminateur_offset | where to start looking for the second terminateur (set to zero if there is only one terminateur).
  lax | whether we skip&warn the usual verifications
  has_external_cat | true if the catalogue will not be read from the current archive (flag used in lax mode only)
  sequential_read | whether to use the escape sequence (if present) to get archive contents and proceed to sequential reading
  info_details | be or not verbose about the archive openning
  gnupg_signed | list of existing signature found for that archive (valid or not)
  sl | slicing layout of the archive (read from sar header if present)
  multi_threaded_crypto | number of worker thread to run for cryptography (1 -> tronconneuse object, more -> parallel_tronconneuse object)
  multi_threaded_compress | number of worker threads to compress/decompress (need compression_block_size > 0)
  header_only | if true, stop the process before openning the encryption layer

## ◆ macro_tools_open_pipes()

void libdar::macro_tools_open_pipes | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const std::string & | input,
|  | const std::string & | output,
|  | tuyau *& | in,
|  | tuyau *& | out )
| extern

open a pair of tuyau objects encapsulating two named pipes.

Parameters

  [in,out] | dialog | for user interaction
  [in] | input | path to the input named pipe
  [in] | output | path to the output named pipe
  [out] | in | resulting tuyau object for input
  [out] | out | resulting tuyau object for output

Note
  in and out parameters must be released by the caller thanks to the "delete" operator

## ◆ nullifyptr()

void libdar::header_version::nullifyptr | ( |  | ) |
| inline private noexcept

Definition at line 135 of file header_version.hpp.

## ◆ op_tools_crit_ask_user_for_data_action()

over_action_data libdar::op_tools_crit_ask_user_for_data_action | ( | user_interaction & | dialog,
|  | const std::string & | full_name,
|  | const cat_entree * | already_here,
|  | const cat_entree * | dolly )
| extern

ask user for Data action

Parameters

  [in] | dialog | for user interaction
  [in] | full_name | full path to the entry do ask decision for
  [in] | already_here | pointer to the object 'in place'
  [in] | dolly | pointer to the object 'to be added'

Returns
  the action decided by the user. The user may also choose to abort, which will throw an Euser_abort exception

## ◆ op_tools_crit_ask_user_for_EA_action()

over_action_ea libdar::op_tools_crit_ask_user_for_EA_action | ( | user_interaction & | dialog,
|  | const std::string & | full_name,
|  | const cat_entree * | already_here,
|  | const cat_entree * | dolly )
| extern

ask user for EA action

Parameters

  [in] | dialog | for user interaction
  [in] | full_name | full path to the entry do ask decision for
  [in] | already_here | pointer to the object 'in place'
  [in] | dolly | pointer to the object 'to be added'

Returns
  the action decided by the user. The user may also choose to abort, which will throw an Euser_abort exception

## ◆ op_tools_crit_ask_user_for_FSA_action()

over_action_ea libdar::op_tools_crit_ask_user_for_FSA_action | ( | user_interaction & | dialog,
|  | const std::string & | full_name,
|  | const cat_entree * | already_here,
|  | const cat_entree * | dolly )
| extern

ask user for FSA action

Parameters

  [in] | dialog | for user interaction
  [in] | full_name | full path to the entry do ask decision for
  [in] | already_here | pointer to the object 'in place'
  [in] | dolly | pointer to the object 'to be added'

Returns
  the action decided by the user. The user may also choose to abort, which will throw an Euser_abort exception

## ◆ op_tools_crit_show_entry_info()

void libdar::op_tools_crit_show_entry_info | ( | user_interaction & | dialog,
|  | const std::string & | full_name,
|  | const cat_entree * | already_here,
|  | const cat_entree * | dolly )
| extern

show information suited for user comparison and decision for entry in conflict

Parameters

  [in] | dialog | for user interaction
  [in] | full_name | path to the entry of the entry to display information
  [in] | already_here | pointer to the object 'in place'
  [in] | dolly | pointer to the object 'to be added'

## ◆ operator+()

std::vector< std::string > libdar::operator+ | ( | std::vector< std::string > | a,
|  | std::vector< std::string > | b )

concatenate two vectors

Parameters

  [in] | a | the first vector
  [in] | b | the second vector

Returns
  a vector containing the elements of a and the element of b

## ◆ operator+=()

template<class T >

std::vector< T > libdar::operator+= | ( | std::vector< T > & | a,
|  | const std::vector< T > & | b )

template function to add two vectors

Definition at line 230 of file tools.hpp.

## ◆ operator=() [1/2]

header_version & libdar::header_version::operator= | ( | const header_version & | ref | ) |
| inline

Definition at line 53 of file header_version.hpp.

## ◆ operator=() [2/2]

header_version & libdar::header_version::operator= | ( | header_version && | ref | ) |
| inline noexcept

Definition at line 54 of file header_version.hpp.

## ◆ pop_and_close_if_type_is()

template<class T >

bool libdar::pile::pop_and_close_if_type_is | ( | T * | ptr | ) |

remove the top generic_file and destroy it

Parameters

  [in] | ptr | is the type of the object that must be found on the top of the stack, It may also be the type of a parent class. Note that the value of the pointer is ignored.

Returns
  true if and only if the object on the top of the stack could be matched to the given type, this object is then poped from the stack and destroyed.

Definition at line 182 of file pile.hpp.

References libdar::pile::top().

## ◆ put() [1/2]

template<class T >

void libdar::heap< T >::put | ( | std::deque< std::unique_ptr< T > > & | list | ) |

Definition at line 119 of file heap.hpp.

## ◆ put() [2/2]

template<class T >

void libdar::heap< T >::put | ( | std::unique_ptr< T > && | obj | ) |

Definition at line 98 of file heap.hpp.

## ◆ set_command_line()

void libdar::header_version::set_command_line | ( | const std::string & | line | ) |
| inline

Definition at line 67 of file header_version.hpp.

## ◆ set_compression_algo()

void libdar::header_version::set_compression_algo | ( | const compression & | zip | ) |
| inline

Definition at line 66 of file header_version.hpp.

## ◆ set_compression_block_size()

void libdar::header_version::set_compression_block_size | ( | const infinint & | bs | ) |
| inline

Definition at line 86 of file header_version.hpp.

## ◆ set_crypted_key()

void libdar::header_version::set_crypted_key | ( | memory_file * | key | ) |
| inline

the object pointed to by key passes to the responsibility of this header_version object

Definition at line 72 of file header_version.hpp.

References libdar::header_version::crypted_key.

## ◆ set_edition()

void libdar::header_version::set_edition | ( | const archive_version & | ed | ) |
| inline

Definition at line 65 of file header_version.hpp.

## ◆ set_initial_offset()

void libdar::header_version::set_initial_offset | ( | const infinint & | offset | ) |
| inline

Definition at line 68 of file header_version.hpp.

## ◆ set_iteration_count()

void libdar::header_version::set_iteration_count | ( | const infinint & | arg | ) |
| inline

Definition at line 83 of file header_version.hpp.

## ◆ set_salt()

void libdar::header_version::set_salt | ( | const std::string & | arg | ) |
| inline

Definition at line 82 of file header_version.hpp.

## ◆ set_signed()

void libdar::header_version::set_signed | ( | bool | is_signed | ) |
| inline

Definition at line 80 of file header_version.hpp.

## ◆ set_slice_layout()

void libdar::header_version::set_slice_layout | ( | slice_layout * | layout | ) |
| inline

the object pointed to by layout is passed under the responsibility of this header_version object

Definition at line 76 of file header_version.hpp.

References libdar::header_version::ref_layout.

## ◆ set_sym_crypto_algo()

void libdar::header_version::set_sym_crypto_algo | ( | const crypto_algo & | algo | ) |
| inline

Definition at line 69 of file header_version.hpp.

## ◆ set_tape_marks()

void libdar::header_version::set_tape_marks | ( | bool | presence | ) |
| inline

Definition at line 79 of file header_version.hpp.

## ◆ skip_less_one()

void libdar::storage::iterator::skip_less_one | ( |  | ) |
| inline private

Definition at line 211 of file storage.hpp.

## ◆ skip_plus_one()

void libdar::storage::iterator::skip_plus_one | ( |  | ) |
| inline private

Definition at line 198 of file storage.hpp.

## ◆ tools_addspacebefore()

std::string libdar::tools_addspacebefore | ( | std::string | s,
|  | U_I | expected_size )
| extern

prepend spaces before the given string

Parameters

  [in] | s | the string to append spaces to
  [in] | expected_size | the minimum size of the resulting string

Returns
  a string at least as much long as expected_size with prepended leading spaces if necessary

## ◆ tools_are_on_same_filesystem()

bool libdar::tools_are_on_same_filesystem | ( | const std::string & | file1,
|  | const std::string & | file2 )
| extern

tells whether two files are on the same mounted filesystem

Parameters

  [in] | file1 | first file
  [in] | file2 | second file

Returns
  true if the two files are located under the same mounting point

Note
  if one of the file is not present or if the filesystem information is not possible to be read an exception is throw (Erange)

## ◆ tools_avoid_slice_overwriting_regex()

void libdar::tools_avoid_slice_overwriting_regex | ( | user_interaction & | dialog,
|  | const entrepot & | ent,
|  | const std::string & | basename,
|  | const std::string & | extension,
|  | bool | info_details,
|  | bool | allow_overwriting,
|  | bool | warn_overwriting,
|  | bool | dry_run )
| extern

prevents slice overwriting: check the presence of slice and if necessary ask the user if they can be removed

Parameters

  [in,out] | dialog | for user interaction
  [in] | ent | entrepot where to check for slice overwriting
  [in] | basename | is the archive basename
  [in] | extension | is the archive filename extension
  [in] | info_details | whether user must be displayed details of the operation
  [in] | allow_overwriting | whether overwriting is allowed by the user
  [in] | warn_overwriting | whether a warning must be issued before overwriting (if allowed)
  [in] | dry_run | do a dry-run exection (no filesystem modification is performed)

Note
  may thow exceptions.

## ◆ tools_block_all_signals()

void libdar::tools_block_all_signals | ( | sigset_t & | old_mask | ) |
| extern

block all signals (based on POSIX sigprocmask)

Parameters

  [out] | old_mask | is set to the old mask value (for later unmasking signals)

Exceptions

  Erange | is thrown if system call failed for some reason

## ◆ tools_blocking_read()

void libdar::tools_blocking_read | ( | int | fd,
|  | bool | mode )
| extern

set blocking/not blocking mode for reading on a file descriptor

Parameters

  [in] | fd | file descriptor to read on
  [in] | mode | set to true for a blocking read and to false for non blocking read

## ◆ tools_check_negative_date()

template<class T >

void libdar::tools_check_negative_date | ( | T & | val,
|  | user_interaction & | ui,
|  | const char * | inode_path,
|  | const char * | nature,
|  | bool | ask_before,
|  | bool | silent )

check the value is not negative, and if asked set it to zero

Parameters

  [in,out] | val | variable which value to check
  [in,out] | ui | for user interaction if necessary
  [in] | inode_path | to the inode for message info
  [in] | nature | type of the date/time (mtime,atime,ctime,birthtime,...)
  [in] | ask_before | whether to just warn or ask user for confirmation
  [in] | silent | if set, do not warn nor ask

Definition at line 671 of file tools.hpp.

References libdar::tools_printf().

## ◆ tools_concat_vector()

std::string libdar::tools_concat_vector | ( | const std::string & | separator,
|  | const std::vector< std::string > & | x )
| extern

concatenate a vectors of strings in a single string

Parameters

  [in] | separator | string to insert between two elements
  [in] | x | the list string

Returns
  the result of the concatenation of the members of the list with separtor between two consecutive members

## ◆ tools_count_in_string()

U_I libdar::tools_count_in_string | ( | const std::string & | s,
|  | const char | a )
| extern

counts the number of a given char in a given string

Parameters

  [in] | s | string to look inside of
  [in] | a | char to look for

Returns
  the number of char found

## ◆ tools_display_date()

std::string libdar::tools_display_date | ( | const datetime & | date | ) |
| extern

convert a date in second to its human readable representation

Parameters

  [in] | date | the date in second

Returns
  the human representation corresponding to the argument

## ◆ tools_display_integer_in_metric_system()

std::string libdar::tools_display_integer_in_metric_system | ( | infinint | number,
|  | const std::string & | unit,
|  | bool | binary )
| extern

convert an integer to its decimal representation with the highest unit of metric system

Parameters

  [in] | number | is the integer to convert
  [in] | unit | unit symbol (o for octet, m for meter, etc.) to apply metric system to, this may be nullptr
  [in] | binary | if set to true using the ki, Gi, Mi ... scale instead of the traditional k, G, M, ... prefixes

Returns
  the string representing the number in metric system (ex: "1 ko", "200 Mio", ...)

## ◆ tools_do_some_files_match_mask_regex()

bool libdar::tools_do_some_files_match_mask_regex | ( | const entrepot & | ent,
|  | const std::string & | file_mask )
| extern

test the presence of files corresponding to a given mask in a directory (regex mask)

Parameters

  [in] | ent | entrepot where to read filesystem from
  [in] | file_mask | regex expression which designates the files to look for

Returns
  true if some files have found matching the file_mask

## ◆ tools_file_size_to_crc_size()

infinint libdar::tools_file_size_to_crc_size | ( | const infinint & | size | ) |
| extern

Defines the CRC size to use for a given filesize.

Parameters

  [in] | size | is the size of the file to protect by CRC

Returns
  crc_size is the size of the crc to use

## ◆ tools_find_last_char_of()

std::string::iterator libdar::tools_find_last_char_of | ( | std::string & | s,
|  | unsigned char | v )
| extern

give a pointer to the last character of the given value in the given string

Parameters

  [in] | s | is the given string
  [in] | v | is the given char value

Returns
  a interator on s, pointing on the last char of s equal to v or a pointing to s.end() if no such char could be found is "s"

Note
  the arguments are not modified neither the data they are pointing to. However the const statement has not been used to be able to return a iterator on the string (and not a const_interator). There is probably other ways to do that (using const_cast) for example

## ◆ tools_get_extended_size()

infinint libdar::tools_get_extended_size | ( | std::string | s,
|  | U_I | base )
| extern

convert the given string to infinint taking care of multiplication suffixes like k, M, T, etc.

Parameters

  [in] | s | is the string to read
  [in] | base | is the multiplication factor (base = 1000 for SI, base = 1024 for computer science use)

Returns
  the value encoded in the given string

## ◆ tools_get_filesize()

infinint libdar::tools_get_filesize | ( | const path & | p | ) |
| extern

retrieve the size in byte of a file

Parameters

  [in] | p | is the path to the file which size is to get

Returns
  the size of the file in byte

## ◆ tools_get_mtime()

datetime libdar::tools_get_mtime | ( | user_interaction & | dialog,
|  | const std::string & | s,
|  | bool | auto_zeroing,
|  | bool | silent,
|  | const std::set< std::string > & | ignored_as_symlink = std::set< std::string >() )
| extern

returns the last modification date of the given file

Parameters

  [in,out] | dialog | for user interaction
  [in] | s | path of the file to get the last mtime
  [in] | auto_zeroing | whether to just warn instead of asking user confirmation
  [in] | silent | if set do not warn nor ask
  [in] | ignored_as_symlink | for inodes present in this set, get the symlink pointed to date rather than the date of they symlink itself (no impact if the inode is not a symlink)

Returns
  the mtime of the given file

## ◆ tools_get_permission()

U_I libdar::tools_get_permission | ( | S_I | fd | ) |
| extern

obtain the permission of the file which descriptor is given

Parameters

  [in] | fd | file's descriptor

Returns
  permission of the given file

Note
  in case of error exception may be thrown

## ◆ tools_get_size()

infinint libdar::tools_get_size | ( | const std::string & | s | ) |
| extern

returns the size of the given plain file

Parameters

  [in] | s | path of the file to get the size

Returns
  the size if the file in byte

## ◆ tools_hook_execute()

void libdar::tools_hook_execute | ( | user_interaction & | ui,
|  | const std::string & | cmd_line )
| extern

execute and retries at user will a given command line

Parameters

  [in] | ui | which way to ask the user whether to continue upon command line error
  [in] | cmd_line | the command line to execute

## ◆ tools_hook_substitute()

std::string libdar::tools_hook_substitute | ( | const std::string & | hook,
|  | const std::string & | path,
|  | const std::string & | basename,
|  | const std::string & | num,
|  | const std::string & | padded_num,
|  | const std::string & | ext,
|  | const std::string & | context,
|  | const std::string & | base_url )
| extern

produces the string resulting from the substitution of %... macro

Parameters

  [in] | hook | the string in which to substitute
  [in] | path | is by what p will be replaced
  [in] | basename | is by what b will be replaced
  [in] | num | is by what n will be replaced
  [in] | padded_num | is by what N will be replaced
  [in] | ext | is by what e will be replaced
  [in] | context | is by what c will be replaced
  [in] | base_url | remote repository base URL

Returns
  the substitued resulting string

Note
  it now relies on tools_substitue

## ◆ tools_hook_substitute_and_execute()

void libdar::tools_hook_substitute_and_execute | ( | user_interaction & | ui,
|  | const std::string & | hook,
|  | const std::string & | path,
|  | const std::string & | basename,
|  | const std::string & | num,
|  | const std::string & | padded_num,
|  | const std::string & | ext,
|  | const std::string & | context,
|  | const std::string & | base_url )
| extern

subsititue and execute command line

Parameters

  [in,out] | ui | this is the way to contact the user
  [in] | hook | the string in which to substitute
  [in] | path | is by what p will be replaced
  [in] | basename | is by what b will be replaced
  [in] | num | is by what n will be replaced
  [in] | padded_num | is by what N will be replaced
  [in] | ext | is by what e will be replaced
  [in] | context | is by what c will be replaced
  [in] | base_url | remote repository base URL

## ◆ tools_infinint2U_64()

bool libdar::tools_infinint2U_64 | ( | infinint | val,
|  | U_64 & | res )
| extern

convert an infinint to U_64 (aka "uint64_t" or yet "unsigned long long")

Note
  : if the infinint is too large to fit in an U_64 it returns false

## ◆ tools_int2octal()

std::string libdar::tools_int2octal | ( | const U_I & | perm | ) |
| extern

convert a number to a string corresponding to its octal representation

Parameters

  perm | is the octal number

Returns
  the corresponding octal string

## ◆ tools_int2str()

std::string libdar::tools_int2str | ( | S_I | x | ) |
| extern

convert integer to string

Parameters

  [in] | x | the integer to convert

Returns
  the decimal representation of the given integer

## ◆ tools_is_case_insensitive_equal()

bool libdar::tools_is_case_insensitive_equal | ( | const std::string & | a,
|  | const std::string & | b )
| extern

compare two string in case insensitive manner

Parameters

  [in] | a | first string to compare
  [in] | b | second string to compare

Returns
  whether the two string given in argument are equal in case insensitive comparison

## ◆ tools_is_equal_with_hourshift()

bool libdar::tools_is_equal_with_hourshift | ( | const infinint & | hourshift,
|  | const datetime & | date1,
|  | const datetime & | date2 )
| extern

test if two dates are equal taking care of a integer hour of difference

Parameters

  [in] | hourshift | is the number of integer hour more or less two date can be considered equal
  [in] | date1 | first date to compare
  [in] | date2 | second date to compare to

Returns
  whether dates are equal or not

## ◆ tools_make_date()

void libdar::tools_make_date | ( | const std::string & | chemin,
|  | bool | symlink,
|  | const datetime & | access,
|  | const datetime & | modif,
|  | const datetime & | birth )
| extern

set dates of a given file, may throw exception

Parameters

  [in] | chemin | the path to the file to set
  [in] | symlink | true if the file is a symlink
  [in] | access | last access date to use
  [in] | modif | last modification date to use
  [in] | birth | time of creation of the file

Note
  if birth time is not known, it should be set to the value of modif for efficiency

## ◆ tools_max()

template<class T >

T libdar::tools_max | ( | T | a,
|  | T | b )

Definition at line 637 of file tools.hpp.

## ◆ tools_memxor()

void libdar::tools_memxor | ( | void * | dest,
|  | const void * | src,
|  | U_I | n )
| extern

Produces in "dest" the XORed value of "dest" and "src".

Parameters

  [in,out] | dest | is the area where to write down the result
  [in] | src | points to vector or array of values to convert
  [in] | n | is the number of byte to convert from src to dest

Note
  dest must be a valid pointer to an allocated memory area of at least n bytes

## ◆ tools_min()

template<class T >

T libdar::tools_min | ( | T | a,
|  | T | b )

Definition at line 638 of file tools.hpp.

## ◆ tools_my_atoi()

bool libdar::tools_my_atoi | ( | const char * | a,
|  | U_I & | val )
| extern

ascii to integer conversion

Parameters

  [in] | a | is the ascii string to convert
  [out] | val | is the resulting value

Returns
  true if the conversion could be done false if the given string does not correspond to the decimal representation of an unsigned integer

Note
  this call is now a warapper around line_tools_str2int

## ◆ tools_name_of_gid()

std::string libdar::tools_name_of_gid | ( | const infinint & | gid | ) |
| extern

convert gid to name in regards of the current system's configuration

Parameters

  [in] | gid | the Group ID number

Returns
  the name of the corresponding group or the gid if none corresponds

## ◆ tools_name_of_uid()

std::string libdar::tools_name_of_uid | ( | const infinint & | uid | ) |
| extern

convert uid to name in regards to the current system's configuration

Parameters

  [in] | uid | the User ID number

Returns
  the name of the corresponding user or the uid if none corresponds

## ◆ tools_noexcept_make_date()

void libdar::tools_noexcept_make_date | ( | const std::string & | chem,
|  | bool | symlink,
|  | const datetime & | last_acc,
|  | const datetime & | last_mod,
|  | const datetime & | birth )
| extern

set dates of a given file, no exception thrown

Parameters

  [in] | chem | the path to the file to set
  [in] | symlink | true if the file is a symlink
  [in] | last_acc | last access date to use
  [in] | last_mod | last modification date to use
  [in] | birth | creation date of the file, if not known, use the value of last_mod for efficiency

## ◆ tools_number_base_decomposition_in_big_endian()

template<class N , class B >

std::deque< B > libdar::tools_number_base_decomposition_in_big_endian | ( | N | number,
|  | const B & | base )

Template for the decomposition of any number in any base (decimal, octal, hexa, etc.)

Parameters

  [in] | number | is the number to decompose
  [in] | base | is the base to decompose the number into

Returns
  a vector of 'digit' int the specified base, the first beeing the less significative

Note
  this template does not take care of the possibily existing optimized euclide division to speed up the operation like what exists for infinint. A specific overriden fonction for this type would be better.
  , the name "big_endian" is erroneous, it gives a little endian vector

Definition at line 577 of file tools.hpp.

## ◆ tools_octal2int()

U_I libdar::tools_octal2int | ( | const std::string & | perm | ) |
| extern

convert octal string to integer

Parameters

  perm | is a string representing a number in octal (string must have a leading zero)

Returns
  the corresponding value as an integer

## ◆ tools_output2xml()

std::string libdar::tools_output2xml | ( | const std::string & | src | ) |
| extern

convert string for xml output

Note
  any < > & quote and double quote are replaced by adequate sequence for unicode
  second point, nothing is done here to replace system native strings to unicode

## ◆ tools_ownership2gid()

uid_t libdar::tools_ownership2gid | ( | const std::string & | group | ) |
| extern

convert string group name or gid to numeric gid value

Parameters

  [in] | group | string username

Returns
  uid value

## ◆ tools_ownership2uid()

uid_t libdar::tools_ownership2uid | ( | const std::string & | user | ) |
| extern

change ownership of the file which descriptor is given

convert string user name or uid to numeric uid value

Parameters

  [in] | user | string username

Returns
  uid value

## ◆ tools_printf()

std::string libdar::tools_printf | ( | const char * | format,
|  |  | ... )
| extern

make printf-like formating to a std::string

Parameters

  [in] | format | the format string
  [in] | ... | list of argument to use against the format string

Returns
  the resulting string

Note
  the supported masks for the format are:
  - %s %c %d %o %% (usual behavior)
  - %x display an integer under hexadecimal notation
  - %i (matches infinint *)
  - %S (matches std::string *)

Referenced by line_tools_split_in_words(), and libdar::tools_check_negative_date().

## ◆ tools_pseudo_random()

U_I libdar::tools_pseudo_random | ( | U_I | max | ) |
| extern

Produces a pseudo random number x, where 0 <= x < max.

Parameters

  [in] | max | defines the range of the random number to return

Returns
  the returned value ranges from 0 (zero) up to max (= including max)

## ◆ tools_read_string()

void libdar::tools_read_string | ( | generic_file & | f,
|  | std::string & | s )
| extern

read a string from a file expecting it to terminate by '\0'

Parameters

  f | the file to read from
  s | the string to put the data to (except the ending '\0')

## ◆ tools_read_string_size()

void libdar::tools_read_string_size | ( | generic_file & | f,
|  | std::string & | s,
|  | infinint | taille )
| extern

read a string if given size from a file '\0' has no special meaning

Parameters

  [in] | f | is the file to read from
  [in] | s | is the string to put read data in
  [in] | taille | is the size in byte to read

## ◆ tools_read_vector()

void libdar::tools_read_vector | ( | generic_file & | f,
|  | std::vector< std::string > & | x )
| extern

read a list of string from a file

Parameters

  [in] | f | the file to read from
  [out] | x | the list to fill from file

## ◆ tools_readlink()

std::string libdar::tools_readlink | ( | const char * | root | ) |
| extern

returns the file pointed to by a symbolic link (or transparent if the file is not a symlink).

Parameters

  root | the path to the file to read

Returns
  the file pointed to by the symlink or the value given in argument if it is not a symlink

Note
  an exception can occur if lack of memory or invalid argument given (nullptr or empty string), system call error...

## ◆ tools_relative2absolute_path()

path libdar::tools_relative2absolute_path | ( | const path & | src,
|  | const path & | cwd )
| extern

transform a relative path to an absolute one given the current directory value

Parameters

  [in] | src | the relative path to transform
  [in] | cwd | the value to take for the current directory

Returns
  the corresponding absolute path

## ◆ tools_set_back_blocked_signals()

void libdar::tools_set_back_blocked_signals | ( | sigset_t | old_mask | ) |
| extern

unblock signals according to given mask

Parameters

  [in] | old_mask | value to set to blocked signal mask

Exceptions

  Erange | is thrown if system call failed for some reason

## ◆ tools_set_ownership()

void libdar::tools_set_ownership | ( | S_I | filedesc,
|  | const std::string & | slice_user,
|  | const std::string & | slice_group )
| extern

change ownership of the file which descriptor is given

Parameters

  [in] | filedesc | file's descriptor
  [in] | slice_user | the user to set the file to. For empty string, no attempts to change the user ownership is done
  [in] | slice_group | the group to set the file to. For empty string, no attempts to change the group ownership is done

Note
  this call may throw Erange exception upon system error

## ◆ tools_set_permission()

void libdar::tools_set_permission | ( | S_I | fd,
|  | U_I | perm )
| extern

change the permission of the file which descriptor is given

Parameters

  [in] | fd | file's descriptor
  [in] | perm | file permission to set the file to

## ◆ tools_str2charptr()

char * libdar::tools_str2charptr | ( | const std::string & | x | ) |
| extern

convert a string to a char *

Parameters

  [in] | x | is the string to convert

Returns
  the address of newly allocated memory containing the equivalent string as the argument

Exceptions

  Ememory | is thrown if the memory allocation failed, this call never return nullptr

Note
  Do not use this function, use std::string::c_str(). The allocated memory must be released by the caller thanks to the "delete []" operator

## ◆ tools_str2int()

U_I libdar::tools_str2int | ( | const std::string & | x | ) |
| extern

convert an integer written in decimal notation to the corresponding value

Parameters

  [in] | x | the decimal representation of the integer

Returns
  the value corresponding to the decimal representation given

## ◆ tools_string2tlv_list()

tlv_list libdar::tools_string2tlv_list | ( | user_interaction & | dialog,
|  | const U_16 & | type,
|  | const std::vector< std::string > & | data )
| extern

Produces a list of TLV from a constant type and a list of string.

Parameters

  [in,out] | dialog | for user interaction
  [in] | type | is the type each TLV will have
  [in] | data | is the list of string to convert into a list of TLV

Returns
  a tlv_list object. Each TLV in the list correspond to a string in the given list

## ◆ tools_string_to_hexa()

std::string libdar::tools_string_to_hexa | ( | const std::string & | input | ) |
| extern

convert a string into its hexadecima representation

Parameters

  [in] | input | input string to convert

Returns
  a string containing an hexadecimal number corresponding to the bytes of the input string

## ◆ tools_substitute()

std::string libdar::tools_substitute | ( | const std::string & | hook,
|  | const std::map< char, std::string > & | corres )
| extern

produce the string resulting from the substition of % macro defined in the map

Parameters

  [in] | hook | is the user's expression in which to proceed to substitution
  [in] | corres | is a map telling which char following a % sign to replace by which string

Returns
  the resulting string of the substitution

## ◆ tools_system()

void libdar::tools_system | ( | user_interaction & | dialog,
|  | const std::vector< std::string > & | argvector )
| extern

wrapper to the "system" system call.

Parameters

  [in,out] | dialog | for user interaction
  [in] | argvector | the equivalent to the argv[] vector

## ◆ tools_system_with_pipe()

void libdar::tools_system_with_pipe | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const std::string & | dar_cmd,
|  | const std::vector< std::string > & | argvpipe )
| extern

wrapper to the "system" system call using anonymous pipe to tranmit arguments to the child process

Parameters

  [in,out] | dialog | for user interaction
  [in] | dar_cmd | the path to the executable to run
  [in] | argvpipe | the list of arguments to pass through anonymous pipe

Note
  the command to execute must understand the –pipe-fd option that gives the filedescriptor to read from the command-line options

## ◆ tools_to_upper()

void libdar::tools_to_upper | ( | const std::string & | r,
|  | std::string & | uppered )
| extern

convert a string to upper case

Parameters

  [in] | r | the string to convert
  [out] | uppered | resulting upper cased string

Note
  in case of invalid wide char met in source string, the upper case convertion is done in ASCII mode (byte by byte)

## ◆ tools_unlink_file_mask_regex()

void libdar::tools_unlink_file_mask_regex | ( | user_interaction & | dialog,
|  | const entrepot & | ent,
|  | const std::string & | file_mask,
|  | bool | info_details )
| extern

remove files from a given directory

Parameters

  [in,out] | dialog | for user interaction
  [in] | ent | entrepot where to remove files from
  [in] | file_mask | regex expression which designates the files to remove
  [in] | info_details | whether user must be displayed details of the operation

Note
  This is equivalent to the 'rm' command with regex expression in place of glob one

## ◆ tools_unsigned_char_to_hexa()

std::string libdar::tools_unsigned_char_to_hexa | ( | unsigned char | x | ) |
| extern

convert a unsigned char into its hexa decima representation

Parameters

  [in] | x | is the byte to convert

Returns
  the string representing the value of x written in hexadecimal

## ◆ tools_uword2str()

std::string libdar::tools_uword2str | ( | U_16 | x | ) |
| extern

convert unsigned word to string

Parameters

  [in] | x | the unsigned word to convert

Returns
  the decimal representation of the given integer

## ◆ tools_vprintf()

std::string libdar::tools_vprintf | ( | const char * | format,
|  | va_list | ap )
| extern

make printf-like formating to a std::string

Parameters

  [in] | format | the format string
  [in] | ap | list of argument to use against the format string

Returns
  the resulting string

Note
  the supported masks for the format are:
  - %s %c %d %% (normal behavior)
  - %i (matches infinint *)
  - %S (matches std::string *)

## ◆ tools_write_string()

void libdar::tools_write_string | ( | generic_file & | f,
|  | const std::string & | s )
| extern

write a string to a file with a '\0' at then end

Parameters

  [in] | f | the file to write to
  [in] | s | the string to write to file

## ◆ tools_write_string_all()

void libdar::tools_write_string_all | ( | generic_file & | f,
|  | const std::string & | s )
| extern

write a string to a file, '\0' has no special meaning nor is added at the end

Parameters

  [in] | f | the file to write to
  [in] | s | the string to write to file

## ◆ tools_write_vector()

void libdar::tools_write_vector | ( | generic_file & | f,
|  | const std::vector< std::string > & | x )
| extern

write a list of string to file

Parameters

  [in] | f | the file to write to
  [in] | x | the list of string to write

## ◆ ~header_version()

libdar::header_version::~header_version | ( |  | ) |
| inline

Definition at line 55 of file header_version.hpp.

## Variable Documentation

## ◆ algo_zip

compression libdar::header_version::algo_zip
| private

compression algorithm used

Definition at line 118 of file header_version.hpp.

## ◆ ANSWER_TYPE_DATA

unsigned char libdar::ANSWER_TYPE_DATA = 'D'
| constexpr

Definition at line 47 of file zapette_protocol.hpp.

## ◆ ANSWER_TYPE_INFININT

unsigned char libdar::ANSWER_TYPE_INFININT = 'I'
| constexpr

Definition at line 48 of file zapette_protocol.hpp.

## ◆ arch_signed

bool libdar::header_version::arch_signed
| private

whether the archive is signed

Definition at line 128 of file header_version.hpp.

## ◆ bits

U_I libdar::header_flags::bits
| private

future implementation could rely on infinint for a arbitrary large bitfield

Definition at line 82 of file header_flags.hpp.

Referenced by libdar::header_flags::clear(), and libdar::header_flags::is_all_cleared().

## ◆ ciphered

bool libdar::header_version::ciphered
| private

whether the archive is ciphered, even if we do not know its crypto algorithm (old archives)

Definition at line 127 of file header_version.hpp.

## ◆ cmd_line

std::string libdar::header_version::cmd_line
| private

used long ago to store cmd_line, then abandonned, then recycled as a user comment field

Definition at line 119 of file header_version.hpp.

## ◆ compr_bs

infinint libdar::header_version::compr_bs
| private

the compression block size (0 for legacy compression mode)

Definition at line 133 of file header_version.hpp.

## ◆ crypted_key

memory_file* libdar::header_version::crypted_key
| private

optional field containing the asymmetrically ciphered key used for strong encryption ciphering

Definition at line 123 of file header_version.hpp.

Referenced by libdar::header_version::set_crypted_key().

## ◆ default_uncompressed_block_size

const U_I libdar::default_uncompressed_block_size = 102400
| constexpr

Definition at line 69 of file proto_compressor.hpp.

## ◆ edition

archive_version libdar::header_version::edition
| private

archive format

Definition at line 117 of file header_version.hpp.

## ◆ GLOBAL_ELASTIC_BUFFER_SIZE

U_I libdar::GLOBAL_ELASTIC_BUFFER_SIZE = 51200
| constexpr

Definition at line 69 of file macro_tools.hpp.

## ◆ has_kdf_params

bool libdar::header_version::has_kdf_params
| private

has salt/ineration/kdf_hash fields valid

Definition at line 129 of file header_version.hpp.

## ◆ has_tape_marks

bool libdar::header_version::has_tape_marks
| private

whether the archive contains tape marks aka escape marks aka sequence marks

Definition at line 125 of file header_version.hpp.

## ◆ initial_offset

infinint libdar::header_version::initial_offset
| private

defines at which offset starts the archive (passed the archive header), this field is obiously only used in the trailer not in the header

Definition at line 120 of file header_version.hpp.

## ◆ iteration_count

infinint libdar::header_version::iteration_count
| private

used for key derivation

Definition at line 131 of file header_version.hpp.

## ◆ kdf_hash

hash_algo libdar::header_version::kdf_hash
| private

used for key derivation

Definition at line 132 of file header_version.hpp.

## ◆ min_uncompressed_block_size

const U_I libdar::min_uncompressed_block_size = 100
| constexpr

Definition at line 70 of file proto_compressor.hpp.

## ◆ PRE_FORMAT_10_ITERATION

U_I libdar::header_version::PRE_FORMAT_10_ITERATION = 2000
| static constexpr private

fixed value used for key derivation before archive format 10

Definition at line 141 of file header_version.hpp.

## ◆ ref_layout

slice_layout* libdar::header_version::ref_layout
| private

optional field used in isolated catalogues to record the slicing layout of their archive of reference

Definition at line 124 of file header_version.hpp.

Referenced by libdar::header_version::set_slice_layout().

## ◆ REQUEST_FIRST_SLICE_HEADER_SIZE

U_I libdar::REQUEST_FIRST_SLICE_HEADER_SIZE = 5
| constexpr

Definition at line 56 of file zapette_protocol.hpp.

## ◆ REQUEST_GET_DATA_NAME

U_I libdar::REQUEST_GET_DATA_NAME = 4
| constexpr

Definition at line 55 of file zapette_protocol.hpp.

## ◆ REQUEST_IS_OLD_START_END_ARCHIVE

U_I libdar::REQUEST_IS_OLD_START_END_ARCHIVE = 3
| constexpr

Definition at line 54 of file zapette_protocol.hpp.

## ◆ REQUEST_OFFSET_CHANGE_CONTEXT_STATUS

U_I libdar::REQUEST_OFFSET_CHANGE_CONTEXT_STATUS = 2
| constexpr

Definition at line 53 of file zapette_protocol.hpp.

## ◆ REQUEST_OFFSET_END_TRANSMIT

U_I libdar::REQUEST_OFFSET_END_TRANSMIT = 0
| constexpr

Definition at line 51 of file zapette_protocol.hpp.

## ◆ REQUEST_OFFSET_GET_FILESIZE

U_I libdar::REQUEST_OFFSET_GET_FILESIZE = 1
| constexpr

Definition at line 52 of file zapette_protocol.hpp.

## ◆ REQUEST_OTHER_SLICE_HEADER_SIZE

U_I libdar::REQUEST_OTHER_SLICE_HEADER_SIZE = 6
| constexpr

Definition at line 57 of file zapette_protocol.hpp.

## ◆ REQUEST_SIZE_SPECIAL_ORDER

U_I libdar::REQUEST_SIZE_SPECIAL_ORDER = 0
| constexpr

Definition at line 50 of file zapette_protocol.hpp.

## ◆ salt

std::string libdar::header_version::salt
| private

used for key derivation

Definition at line 130 of file header_version.hpp.

## ◆ SAUV_MAGIC_NUMBER

const U_32 libdar::SAUV_MAGIC_NUMBER = 123

Definition at line 44 of file header.hpp.

## ◆ sym

crypto_algo libdar::header_version::sym
| private

strong encryption algorithm used for symmetrical encryption

Definition at line 122 of file header_version.hpp.

## ◆ WR_BUF_ERROR

const int libdar::WR_BUF_ERROR = 6

Definition at line 64 of file wrapperlib.hpp.

## ◆ WR_DATA_ERROR

const int libdar::WR_DATA_ERROR = 4

Definition at line 62 of file wrapperlib.hpp.

## ◆ WR_FINISH

const int libdar::WR_FINISH = 8

Definition at line 66 of file wrapperlib.hpp.

## ◆ WR_MEM_ERROR

const int libdar::WR_MEM_ERROR = 1

Definition at line 59 of file wrapperlib.hpp.

## ◆ WR_NO_FLUSH

const int libdar::WR_NO_FLUSH = 5

Definition at line 63 of file wrapperlib.hpp.

## ◆ WR_OK

const int libdar::WR_OK = 0

Definition at line 58 of file wrapperlib.hpp.

## ◆ WR_STREAM_END

const int libdar::WR_STREAM_END = 7

Definition at line 65 of file wrapperlib.hpp.

## ◆ WR_STREAM_ERROR

const int libdar::WR_STREAM_ERROR = 3

Definition at line 61 of file wrapperlib.hpp.

## ◆ WR_VERSION_ERROR

const int libdar::WR_VERSION_ERROR = 2

Definition at line 60 of file wrapperlib.hpp.