Disk ARchive
2.7.15
Full featured and portable backup and archiving tool
|
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 More... | |
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 , libdar::inode_only , libdar::fake , libdar::not_saved , libdar::delta } |
data saved status for an entry More... | |
enum class | libdar::ea_saved_status { libdar::none , libdar::partial , libdar::fake , libdar::full , libdar::removed } |
EA saved status for an entry. More... | |
enum class | libdar::fsa_saved_status { libdar::none , libdar::partial , libdar::full } |
FSA saved status for an entry. More... | |
enum | libdar::elastic_direction { elastic_forward , elastic_backward } |
reading direction of an elastic buffer | |
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 | |
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 | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
bool | libdar::ea_filesystem_has_ea (const std::string &name) |
test the presence of EA for a given file More... | |
bool | libdar::ea_filesystem_has_ea (const std::string &name, const mask &filter) |
test the presence of EA for a given file More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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. More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
void | libdar::tools_read_string (generic_file &f, std::string &s) |
read a string from a file expecting it to terminate by '\0' More... | |
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 More... | |
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 More... | |
infinint | libdar::tools_get_filesize (const path &p) |
retrieve the size in byte of a file More... | |
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 More... | |
void | libdar::tools_blocking_read (int fd, bool mode) |
set blocking/not blocking mode for reading on a file descriptor More... | |
std::string | libdar::tools_name_of_uid (const infinint &uid) |
convert uid to name in regards to the current system's configuration More... | |
std::string | libdar::tools_name_of_gid (const infinint &gid) |
convert gid to name in regards of the current system's configuration More... | |
std::string | libdar::tools_uword2str (U_16 x) |
convert unsigned word to string More... | |
std::string | libdar::tools_int2str (S_I x) |
convert integer to string More... | |
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 More... | |
std::string | libdar::tools_display_date (const datetime &date) |
convert a date in second to its human readable representation More... | |
char * | libdar::tools_str2charptr (const std::string &x) |
convert a string to a char * More... | |
U_I | libdar::tools_str2int (const std::string &x) |
convert an integer written in decimal notation to the corresponding value More... | |
void | libdar::tools_system (user_interaction &dialog, const std::vector< std::string > &argvector) |
wrapper to the "system" system call. More... | |
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 More... | |
void | libdar::tools_write_vector (generic_file &f, const std::vector< std::string > &x) |
write a list of string to file More... | |
void | libdar::tools_read_vector (generic_file &f, std::vector< std::string > &x) |
read a list of string from a file More... | |
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 More... | |
std::vector< std::string > | libdar::operator+ (std::vector< std::string > a, std::vector< std::string > b) |
concatenate two vectors More... | |
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 More... | |
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). More... | |
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 More... | |
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 More... | |
bool | libdar::tools_is_case_insensitive_equal (const std::string &a, const std::string &b) |
compare two string in case insensitive manner More... | |
void | libdar::tools_to_upper (const std::string &r, std::string &uppered) |
convert a string to upper case More... | |
std::string | libdar::tools_printf (const char *format,...) |
make printf-like formating to a std::string More... | |
std::string | libdar::tools_vprintf (const char *format, va_list ap) |
make printf-like formating to a std::string More... | |
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) More... | |
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 More... | |
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 More... | |
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 More... | |
path | libdar::tools_relative2absolute_path (const path &src, const path &cwd) |
transform a relative path to an absolute one given the current directory value More... | |
void | libdar::tools_block_all_signals (sigset_t &old_mask) |
block all signals (based on POSIX sigprocmask) More... | |
void | libdar::tools_set_back_blocked_signals (sigset_t old_mask) |
unblock signals according to given mask More... | |
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 More... | |
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 More... | |
infinint | libdar::tools_get_size (const std::string &s) |
returns the size of the given plain file More... | |
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. More... | |
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 More... | |
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 More... | |
void | libdar::tools_hook_execute (user_interaction &ui, const std::string &cmd_line) |
execute and retries at user will a given command line More... | |
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 More... | |
std::string | libdar::tools_output2xml (const std::string &src) |
convert string for xml output More... | |
U_I | libdar::tools_octal2int (const std::string &perm) |
convert octal string to integer More... | |
std::string | libdar::tools_int2octal (const U_I &perm) |
convert a number to a string corresponding to its octal representation More... | |
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 More... | |
U_I | libdar::tools_get_permission (S_I fd) |
obtain the permission of the file which descriptor is given More... | |
uid_t | libdar::tools_ownership2uid (const std::string &user) |
change ownership of the file which descriptor is given More... | |
uid_t | libdar::tools_ownership2gid (const std::string &group) |
convert string group name or gid to numeric gid value More... | |
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 More... | |
void | libdar::tools_memxor (void *dest, const void *src, U_I n) |
Produces in "dest" the XORed value of "dest" and "src". More... | |
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. More... | |
U_I | libdar::tools_pseudo_random (U_I max) |
Produces a pseudo random number x, where 0 <= x < max. More... | |
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.) More... | |
std::string | libdar::tools_unsigned_char_to_hexa (unsigned char x) |
convert a unsigned char into its hexa decima representation More... | |
std::string | libdar::tools_string_to_hexa (const std::string &input) |
convert a string into its hexadecima representation More... | |
infinint | libdar::tools_file_size_to_crc_size (const infinint &size) |
Defines the CRC size to use for a given filesize. More... | |
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") More... | |
bool | libdar::tools_my_atoi (const char *a, U_I &val) |
ascii to integer conversion More... | |
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 More... | |
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 More... | |
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 More... | |
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 |
Libdar internal symbols.
Understanding this is not necessary to use libdar through the API. This is libdar internal code documentation
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
[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 |
Definition at line 58 of file proto_tronco.hpp.
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.
|
strong |
EA saved status for an entry.
Definition at line 55 of file cat_status.hpp.
|
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:
Enumerator | |
---|---|
none | no FSA saved |
partial | FSA unchanged, not fully stored. |
full | FSA saved. |
Definition at line 73 of file cat_status.hpp.
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.
|
strong |
data saved status for an entry
Definition at line 44 of file cat_status.hpp.
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
[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 |
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
[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 |
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
[in] | name | is the filename which EA must be altered |
[in] | filter | is a mask that defines which EA names have to be removed |
bool libdar::ea_filesystem_has_ea | ( | const std::string & | name | ) |
test the presence of EA for a given file
[in] | name | is the filename which EA presence must be check against |
bool libdar::ea_filesystem_has_ea | ( | const std::string & | name, |
const mask & | filter | ||
) |
test the presence of EA for a given file
[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 |
ea_attributs* libdar::ea_filesystem_read_ea | ( | const std::string & | chemin, |
const mask & | filter | ||
) |
read EA associated to a given file
[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 |
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
[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 |
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
bool libdar::filesystem_tools_read_linux_birthtime | ( | const std::string & | target, |
datetime & | val | ||
) |
read the birthtime of target inode
[in] | target | the path the the inode to read the birthtime of |
[out] | val | the birthtime (only valid if the call returned true) |
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_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_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 | ||
) |
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 |
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
[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 |
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
[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 |
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
[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) |
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
[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) |
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
[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) |
+-top LIBDAR_STACK_LABEL_ +------------------------------------------------------—+------------------—+ | compressor | | +------------------------------------------------------—+------------------—+ | [ escape ] | | +– - - - - - - - - - - - - - - - - - - - - - - - - - - - +------------------—+ | cache | (paralle_)tronconneuse | scrambler | | | [ cache ] |_CACHE_PIPE | | trivial_sar | null_file | sar | | +------------------------------------------------------—+------------------—+ +-bottom
gives the location of data EA and FSA (when they are saved) of the object given in argument
[in] | obj | a pointer to the object which data & EFSA is to be located |
[in] | sl | slice layout of the 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 | ||
) |
setup the given pile object to contain a stack of generic_files suitable to read an archive
+-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
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 |
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.
[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 |
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
[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' |
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
[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' |
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
[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' |
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
[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' |
std::vector<std::string> libdar::operator+ | ( | std::vector< std::string > | a, |
std::vector< std::string > | b | ||
) |
concatenate two vectors
[in] | a | the first vector |
[in] | b | the second vector |
bool libdar::pile::pop_and_close_if_type_is | ( | T * | ptr | ) |
remove the top generic_file and destroy it
[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. |
Definition at line 182 of file pile.hpp.
References libdar::pile::top().
std::string libdar::tools_addspacebefore | ( | std::string | s, |
U_I | expected_size | ||
) |
prepend spaces before the given string
[in] | s | the string to append spaces to |
[in] | expected_size | the minimum size of the resulting string |
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
[in] | file1 | first file |
[in] | file2 | second file |
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
[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) |
void libdar::tools_block_all_signals | ( | sigset_t & | old_mask | ) |
block all signals (based on POSIX sigprocmask)
[out] | old_mask | is set to the old mask value (for later unmasking signals) |
Erange | is thrown if system call failed for some reason |
void libdar::tools_blocking_read | ( | int | fd, |
bool | mode | ||
) |
set blocking/not blocking mode for reading on a file descriptor
[in] | fd | file descriptor to read on |
[in] | mode | set to true for a blocking read and to false for non blocking read |
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
[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().
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
[in] | separator | string to insert between two elements |
[in] | x | the list string |
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
[in] | s | string to look inside of |
[in] | a | char to look for |
std::string libdar::tools_display_date | ( | const datetime & | date | ) |
convert a date in second to its human readable representation
[in] | date | the date in second |
std::string libdar::tools_display_integer_in_metric_system | ( | infinint | number, |
const std::string & | unit, | ||
bool | binary | ||
) |
convert an integer to its decimal representation with the highest unit of metric system
[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 |
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)
[in] | ent | entrepot where to read filesystem from |
[in] | file_mask | regex expression which designates the files to look for |
Defines the CRC size to use for a given filesize.
[in] | size | is the size of the file to protect by CRC |
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
[in] | s | is the given string |
[in] | v | is the given char value |
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.
[in] | s | is the string to read |
[in] | base | is the multiplication factor (base = 1000 for SI, base = 1024 for computer science use) |
retrieve the size in byte of a file
[in] | p | is the path to the file which size is to get |
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
[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) |
U_I libdar::tools_get_permission | ( | S_I | fd | ) |
obtain the permission of the file which descriptor is given
[in] | fd | file's descriptor |
infinint libdar::tools_get_size | ( | const std::string & | s | ) |
returns the size of the given plain file
[in] | s | path of the file to get the size |
void libdar::tools_hook_execute | ( | user_interaction & | ui, |
const std::string & | cmd_line | ||
) |
execute and retries at user will a given command line
[in] | ui | which way to ask the user whether to continue upon command line error |
[in] | cmd_line | the command line to execute |
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
[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 |
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
[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 |
bool libdar::tools_infinint2U_64 | ( | infinint | val, |
U_64 & | res | ||
) |
convert an infinint to U_64 (aka "uint64_t" or yet "unsigned long long")
std::string libdar::tools_int2octal | ( | const U_I & | perm | ) |
convert a number to a string corresponding to its octal representation
perm | is the octal number |
std::string libdar::tools_int2str | ( | S_I | x | ) |
convert integer to string
[in] | x | the integer to convert |
bool libdar::tools_is_case_insensitive_equal | ( | const std::string & | a, |
const std::string & | b | ||
) |
compare two string in case insensitive manner
[in] | a | first string to compare |
[in] | b | second string to compare |
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
[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 |
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
[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 |
void libdar::tools_memxor | ( | void * | dest, |
const void * | src, | ||
U_I | n | ||
) |
Produces in "dest" the XORed value of "dest" and "src".
[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 |
bool libdar::tools_my_atoi | ( | const char * | a, |
U_I & | val | ||
) |
ascii to integer conversion
[in] | a | is the ascii string to convert |
[out] | val | is the resulting value |
std::string libdar::tools_name_of_gid | ( | const infinint & | gid | ) |
convert gid to name in regards of the current system's configuration
[in] | gid | the Group ID number |
std::string libdar::tools_name_of_uid | ( | const infinint & | uid | ) |
convert uid to name in regards to the current system's configuration
[in] | uid | the User ID number |
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
[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 |
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.)
[in] | number | is the number to decompose |
[in] | base | is the base to decompose the number into |
U_I libdar::tools_octal2int | ( | const std::string & | perm | ) |
convert octal string to integer
perm | is a string representing a number in octal (string must have a leading zero) |
std::string libdar::tools_output2xml | ( | const std::string & | src | ) |
convert string for xml output
uid_t libdar::tools_ownership2gid | ( | const std::string & | group | ) |
convert string group name or gid to numeric gid value
[in] | group | string username |
uid_t libdar::tools_ownership2uid | ( | const std::string & | user | ) |
change ownership of the file which descriptor is given
convert string user name or uid to numeric uid value
[in] | user | string username |
std::string libdar::tools_printf | ( | const char * | format, |
... | |||
) |
make printf-like formating to a std::string
[in] | format | the format string |
[in] | ... | list of argument to use against the format string |
Referenced by line_tools_split_in_words(), and libdar::tools_check_negative_date().
U_I libdar::tools_pseudo_random | ( | U_I | max | ) |
Produces a pseudo random number x, where 0 <= x < max.
[in] | max | defines the range of the random number to return |
void libdar::tools_read_string | ( | generic_file & | f, |
std::string & | s | ||
) |
read a string from a file expecting it to terminate by '\0'
f | the file to read from |
s | the string to put the data to (except the ending '\0') |
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
[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 |
void libdar::tools_read_vector | ( | generic_file & | f, |
std::vector< std::string > & | x | ||
) |
read a list of string from a file
[in] | f | the file to read from |
[out] | x | the list to fill from file |
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).
root | the path to the file to read |
transform a relative path to an absolute one given the current directory value
[in] | src | the relative path to transform |
[in] | cwd | the value to take for the current directory |
void libdar::tools_set_back_blocked_signals | ( | sigset_t | old_mask | ) |
unblock signals according to given mask
[in] | old_mask | value to set to blocked signal mask |
Erange | is thrown if system call failed for some reason |
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
[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 |
void libdar::tools_set_permission | ( | S_I | fd, |
U_I | perm | ||
) |
change the permission of the file which descriptor is given
[in] | fd | file's descriptor |
[in] | perm | file permission to set the file to |
char* libdar::tools_str2charptr | ( | const std::string & | x | ) |
convert a string to a char *
[in] | x | is the string to convert |
Ememory | is thrown if the memory allocation failed, this call never return nullptr |
U_I libdar::tools_str2int | ( | const std::string & | x | ) |
convert an integer written in decimal notation to the corresponding value
[in] | x | the decimal representation of the integer |
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.
[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 |
std::string libdar::tools_string_to_hexa | ( | const std::string & | input | ) |
convert a string into its hexadecima representation
[in] | input | input string to convert |
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
[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 |
void libdar::tools_system | ( | user_interaction & | dialog, |
const std::vector< std::string > & | argvector | ||
) |
wrapper to the "system" system call.
[in,out] | dialog | for user interaction |
[in] | argvector | the equivalent to the argv[] vector |
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
[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 |
void libdar::tools_to_upper | ( | const std::string & | r, |
std::string & | uppered | ||
) |
convert a string to upper case
[in] | r | the string to convert |
[out] | uppered | resulting upper cased string |
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
[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 |
std::string libdar::tools_unsigned_char_to_hexa | ( | unsigned char | x | ) |
convert a unsigned char into its hexa decima representation
[in] | x | is the byte to convert |
std::string libdar::tools_uword2str | ( | U_16 | x | ) |
convert unsigned word to string
[in] | x | the unsigned word to convert |
std::string libdar::tools_vprintf | ( | const char * | format, |
va_list | ap | ||
) |
make printf-like formating to a std::string
[in] | format | the format string |
[in] | ap | list of argument to use against the format string |
void libdar::tools_write_string | ( | generic_file & | f, |
const std::string & | s | ||
) |
write a string to a file with a '\0' at then end
[in] | f | the file to write to |
[in] | s | the string to write to file |
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
[in] | f | the file to write to |
[in] | s | the string to write to file |
void libdar::tools_write_vector | ( | generic_file & | f, |
const std::vector< std::string > & | x | ||
) |
write a list of string to file
[in] | f | the file to write to |
[in] | x | the list of string to write |