Disk ARchive
2.4.21
|
libdar namespace encapsulate all libdar symbols More...
Namespaces | |
compile_time | |
nested namespace inside libdar | |
Classes | |
class | archive |
the archive class realizes the most general operations on archives More... | |
class | archive_options_create |
class holding optional parameters used to create an archive More... | |
class | archive_options_extract |
class holding optional parameters used to extract files from an existing archive More... | |
class | archive_options_isolate |
class holding optional parameters used to isolate an existing archive More... | |
class | archive_options_listing |
class holding optional parameters used to list the contents of an existing archive More... | |
class | archive_options_merge |
class holding optional parameters used to proceed to the merge operation More... | |
class | archive_options_read |
class holding optional parameters used to read an existing archive More... | |
class | archive_options_test |
class holding optional parameters used to test the structure coherence of an existing archive More... | |
class | archive_version |
class archive_version manages the version of the archive format More... | |
class | blockdev |
the block device class More... | |
class | bool_mask |
boolean mask, either always true or false More... | |
class | cache |
the cache class implements a very basic read/write caching mechanism More... | |
class | catalogue |
the catalogue class which gather all objects contained in a give archive More... | |
class | chardev |
the char device class More... | |
class | compressor |
compression class for gzip and bzip2 algorithms More... | |
class | crit_action |
the global action for overwriting More... | |
class | crit_and |
realises the AND operator More... | |
class | crit_chain |
the crit_chain class sequences crit_actions up to full definition of the action More... | |
class | crit_constant_action |
the basic constant action More... | |
class | crit_in_place_data_bigger |
returns true if the data of the first entry is bigger or equal to the one of the second entry More... | |
class | crit_in_place_data_dirty |
return true if the entry is a dirty file (or hard linked dirty file) More... | |
class | crit_in_place_data_more_recent |
returns true if the data of the first entry is more recent or of the same date of the one of the second entry More... | |
class | crit_in_place_data_more_recent_or_equal_to |
returns true if the data of the first entry is more recent or of the same date as the fixed date given in argument to the constructor More... | |
class | crit_in_place_data_saved |
returns true if the data of the first entry is saved int the archive (not marked as unchanged since the archive of reference) More... | |
class | crit_in_place_data_sparse |
return true if the entry is a sparse file (or hard linked sparse file) More... | |
class | crit_in_place_EA_bigger |
returns true if the space used by EA of the first entry is greater or equal to the space used by the EA of the second entry (no EA means 0 byte for EA storage) More... | |
class | crit_in_place_EA_more_recent |
returns true if the EA of the first entry is more recent or equal to the one of the second entry More... | |
class | crit_in_place_EA_more_recent_or_equal_to |
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument to the constructor More... | |
class | crit_in_place_EA_present |
class | crit_in_place_EA_saved |
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of reference More... | |
class | crit_in_place_is_dir |
returns true if the first entry is a directory (whatever is the second) More... | |
class | crit_in_place_is_file |
returns true if the first entry is a plain file (whatever is the second) More... | |
class | crit_in_place_is_hardlinked_inode |
returns true if the first entry is a inode with several hard links (whatever is the second entry) More... | |
class | crit_in_place_is_inode |
returns true if the first entry is an inode (whatever is the second) More... | |
class | crit_in_place_is_new_hardlinked_inode |
returns true if the first entry is a inode with several hard links (whatever is the second entry) and also if this first entry is the first we meet that points to this hard linked inode More... | |
class | crit_in_place_more_EA |
returns true if the first entry has more or even EA (in number not in size) than the second entry More... | |
class | crit_not |
realises the negation of the criterium given in argument to its constructor More... | |
class | crit_same_type |
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlink/directory/unix socket) More... | |
class | criterium |
the generic criterium class, parent of all criterium More... | |
class | crypto_sym |
implementation of encryption using symetrical cryptography used in libgcrypt (among which is blowfish) More... | |
class | data_dir |
the data_dir class inherits from data_tree and holds the directory tree's parent relationship More... | |
class | data_tree |
the data_tree class stores presence of a given file in a set of archives More... | |
class | database |
the database class defines the dar_manager database More... | |
class | database_add_options |
options to add an archive to base More... | |
class | database_change_basename_options |
options for changing a given archive's basename More... | |
class | database_change_path_options |
options for changing a given archive's path More... | |
class | database_dump_options |
options to write a database to file More... | |
class | database_open_options |
options to open a database More... | |
class | database_remove_options |
options to remove an archive from the base More... | |
class | database_restore_options |
options for restoration from database More... | |
class | database_used_options |
options for file "used" in archive More... | |
class | deci |
decimal class, convert infinint from and to decimal represention More... | |
class | defile |
the defile class keep trace of the real path of files while the flow in the filter routines More... | |
class | detruit |
the deleted file entry More... | |
class | device |
the special device root class More... | |
class | directory |
the directory inode class More... | |
class | door |
the class for Door IPC (mainly for Solaris) More... | |
class | ea_attributs |
the class ea_attributs manages the set of EA that can be associated to an inode More... | |
class | Ebug |
exception used to signal a bug. A bug is triggered when reaching some code that should never be reached More... | |
class | Ecompilation |
exception used when a requested fearture has not beed activated at compilation time More... | |
class | Edata |
exception used when an error concerning the treated data has been met More... | |
class | Edeci |
exception used to signal convertion problem between infinint and string (decimal representation) More... | |
class | Efeature |
exception used when a requested feature is not (yet) implemented More... | |
class | Egeneric |
this is the parent class of all exception classes. More... | |
class | Ehardware |
exception used when hardware problem is found More... | |
class | Einfinint |
exception used when arithmetic error is detected when operating on infinint More... | |
class | elastic |
the elastic buffer class More... | |
class | Elibcall |
exception used to signal an error in the argument given to libdar call of the API More... | |
class | Elimitint |
exception used when a limitint overflow is detected, the maximum value of the limitint has been exceeded More... | |
class | Ememory |
exception used when memory has been exhausted More... | |
class | entree |
the root class from all other inherite for any entry in the catalogue More... | |
struct | entree_stats |
holds the statistics contents of a catalogue More... | |
class | eod |
the End of Directory entry class More... | |
class | Erange |
exception used to signal range error More... | |
class | Escript |
exception used when error the inter-slice user command returned an error code More... | |
class | Esecu_memory |
exception used when secure memory has been exhausted More... | |
class | et_mask |
makes an AND operator between two or more masks More... | |
struct | etage |
the etage structure keep trace of directory contents More... | |
class | Ethread_cancel |
exception used when the thread libdar is running in is asked to stop More... | |
class | Ethread_cancel_with_attr |
Ethread_cancel with infinint attribute. More... | |
class | etoile |
the hard link implementation (etoile means star in French, seen a star as a point from which are thrown many ray of light) More... | |
class | Euser_abort |
exception used to signal that the user has aborted the operation More... | |
class | exclude_dir_mask |
matches if string is the given constructor string or a sub directory of it More... | |
class | file |
the plain file class More... | |
class | filesystem_backup |
make a flow sequence of inode to feed the backup filtering routing More... | |
class | filesystem_diff |
make a flow of inode to feed the difference filter routine More... | |
class | filesystem_hard_link_read |
keep trace of hard links when reading the filesystem More... | |
class | filesystem_hard_link_write |
keep trace of already written inodes to restore hard links More... | |
class | filesystem_restore |
receive the flow of inode from the restoration filtering routing and promotes these to real filesystem objects More... | |
class | generic_file |
this is the interface class from which all other data transfer classes inherit More... | |
class | header |
this class manages the header of each slice More... | |
struct | header_version |
manages of the archive header and trailer More... | |
class | ignored |
the present file to ignore (not to be recorded as deleted later) More... | |
class | ignored_dir |
the ignored directory class, to be promoted later as empty directory if needed More... | |
class | infinint |
the arbitrary large positive integer class More... | |
class | inode |
the root class for all inode More... | |
class | lien |
the symbolic link inode class More... | |
class | limitint |
class | list_entry |
class | mask |
the generic class, parent of all masks More... | |
class | mask_list |
class | mem_ui |
class mem_ui to keep a copy of a user_interaction object More... | |
class | mirage |
the hard link implementation, mirage is the named entry owned by a directory it points to a common "etoile class" More... | |
class | nomme |
the base class for all entry that have a name More... | |
class | not_mask |
negation of another mask More... | |
class | null_file |
the null_file class implements the /dev/null behavior More... | |
class | ou_mask |
makes the OR operator between two or more masks More... | |
class | path |
the class path is here to manipulate paths in the Unix notation: using'/' More... | |
class | prise |
the Unix socket inode class More... | |
class | regular_mask |
matches regular expressions (see "man 7 regex") More... | |
class | same_path_mask |
matches if string is exactly the given mask (no wilde card expression) More... | |
class | sar |
Sar class stands for Segmentation And Reassembly class. More... | |
class | scrambler |
scrambler is a very weak encryption scheme More... | |
class | secu_string |
class secu_string More... | |
class | semaphore |
class semaphore More... | |
class | simple_mask |
matches as done on shell command lines (see "man 7 glob") More... | |
class | simple_path_mask |
string matches if it is subdir of mask or mask is a subdir of expression More... | |
class | slave_zapette |
this class answers to order given by a zapette object More... | |
class | statistics |
structure returned by libdar call to give a summary of the operation done in term of file treated More... | |
class | storage |
arbitrary large storage structure More... | |
class | string_file |
class string_file emulates a generic_file frome a std::string More... | |
class | terminateur |
terminateur class indicates the location of the beginning of the catalogue More... | |
class | testing |
the testing class binds criterium to actions More... | |
class | thread_cancellation |
class to be used as parent to provide checkpoints to inherited classes More... | |
class | tlv |
Type Length Value Structure. More... | |
class | trivial_sar |
"trivial sar" emulates the behavior of sar when all data must be keept in a arbitrary length single slice More... | |
class | tronc |
makes a segment of a generic_file appear like a real generic_file More... | |
class | tronconneuse |
this is a partial implementation of the generic_file interface to cypher/decypher data block by block. More... | |
class | trontextual |
trontextual class is a contextual class tronc, that's all. More... | |
class | tube |
the named pipe class More... | |
class | tuyau |
pipe implementation under the generic_file interface. More... | |
class | user_interaction |
This is a pure virtual class that is used by libdar when interaction with the user is required. More... | |
class | user_interaction_blind |
full implementation class for user_interaction, which shows nothing and assumes answer "no" to any question More... | |
class | user_interaction_callback |
full implemented class for user_interaction based on callback functions. More... | |
class | wrapperlib |
this class encapsulates calls to libz or libbz2 More... | |
class | zapette |
zapette emulate a file that is remotely controlled by slave_zapette More... | |
Typedefs | |
typedef U_16 | archive_num |
typedef U_32 | magic_number |
typedef unsigned char | int_tools_bitfield[8] |
Enumerations | |
enum | saved_status { s_saved, s_fake, s_not_saved } |
enum | compression { none = 'n', gzip = 'z', bzip2 = 'y', lzo = 'l' } |
the different compression algorithm available More... | |
enum | over_action_data { data_preserve, data_overwrite, data_preserve_mark_already_saved, data_overwrite_mark_already_saved, data_remove, data_undefined, data_ask } |
the possible actions for overwriting data | |
enum | over_action_ea { EA_preserve, EA_overwrite, EA_clear, EA_preserve_mark_already_saved, EA_overwrite_mark_already_saved, EA_merge_preserve, EA_merge_overwrite, EA_undefined, EA_ask } |
the possible action for overwriting EA | |
enum | crypto_algo { crypto_none, crypto_scrambling, crypto_blowfish, crypto_aes256, crypto_twofish256, crypto_serpent256, crypto_camellia256 } |
the different cypher available for encryption (strong or weak) More... | |
enum | elastic_direction { elastic_forward, elastic_backward } |
enum | gf_mode { gf_read_only, gf_write_only, gf_read_write } |
generic_file openning modes More... | |
enum | hash_algo { hash_none, hash_md5, hash_sha1 } |
enum | flag_type { flag_type_terminal = 'T', flag_type_non_terminal = 'N', flag_type_located_at_end_of_slice = 'E' } |
enum | wrapperlib_mode { zlib_mode, bzlib_mode } |
Functions | |
const archive_version | empty_archive_version () |
bool | compatible_signature (unsigned char a, unsigned char b) |
unsigned char | mk_signature (unsigned char base, saved_status state) |
unsigned char | get_base_signature (unsigned char a) |
compression | char2compression (char a) |
char | compression2char (compression c) |
std::string | compression2string (compression c) |
compression | string2compression (const std::string &a) |
crc * | create_crc_from_file (generic_file &f, bool old=false) |
crc * | create_crc_from_size (infinint width) |
over_action_ea | crit_ask_user_for_EA_action (user_interaction &dialog, const std::string &full_name, const entree *already_here, const entree *dolly) |
ask user for EA action More... | |
over_action_data | crit_ask_user_for_data_action (user_interaction &dialog, const std::string &full_name, const entree *already_here, const entree *dolly) |
ask user for Data action More... | |
void | crit_show_entry_info (user_interaction &dialog, const std::string &full_name, const entree *already_here, const entree *dolly) |
show information suited for user comparison and decision for entry in conflict More... | |
void | crypto_split_algo_pass (const secu_string &all, crypto_algo &algo, secu_string &pass) |
bool | crypto_min_ver_libgcrypt_no_bug () |
data_dir * | data_tree_read (generic_file &f, unsigned char db_version) |
bool | data_tree_find (path chemin, const data_dir &racine, const data_tree *&ptr) |
lookup routine to find a pointer to the dat_dir object corresponding to the given path More... | |
void | data_tree_update_with (const directory *dir, archive_num archive, data_dir *racine) |
archive_num | data_tree_permutation (archive_num src, archive_num dst, archive_num x) |
generic_file * | database_header_create (user_interaction &dialog, const std::string &filename, bool overwrite) |
create the header for a dar_manager database More... | |
generic_file * | database_header_open (user_interaction &dialog, const std::string &filename, unsigned char &db_version) |
read the header of a dar_manager database More... | |
const unsigned char | database_header_get_supported_version () |
std::ostream & | operator<< (std::ostream &ref, const infinint &arg) |
specific << operator to use infinint in std::ostream More... | |
ea_attributs * | ea_filesystem_read_ea (const std::string &chemin, const mask &filter) |
read EA associated to a given file More... | |
bool | 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 | 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 | ea_filesystem_has_ea (const std::string &name) |
test the presence of EA for a given file More... | |
bool | ea_filesystem_has_ea (const std::string &name, const mask &filter) |
test the presence of EA for a given file More... | |
const char * | dar_gettext (const char *) |
a routine to change NLS domaine forth and back for inline routines | |
void | filtre_restore (user_interaction &dialog, const mask &filtre, const mask &subtree, catalogue &cat, const path &fs_racine, bool fs_warn_overwrite, bool info_details, statistics &st, const mask &ea_mask, bool flat, inode::comparison_fields what_to_check, bool warn_remove_no_match, bool empty, bool display_skipped, bool empty_dir, const crit_action &x_overwrite, archive_options_extract::t_dirty dirty, bool only_deleted, bool not_deleted) |
void | filtre_sauvegarde (user_interaction &dialog, const mask &filtre, const mask &subtree, pile &stack, catalogue &cat, catalogue &ref, const path &fs_racine, bool info_details, 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, bool same_fs, inode::comparison_fields what_to_check, bool snapshot, bool cache_directory_tagging, bool display_skipped, 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) |
void | filtre_difference (user_interaction &dialog, const mask &filtre, const mask &subtree, catalogue &cat, const path &fs_racine, bool info_details, statistics &st, const mask &ea_mask, bool alter_time, bool furtive_read_mode, inode::comparison_fields what_to_check, bool display_skipped, const infinint &hourshift, bool compare_symlink_date) |
void | filtre_test (user_interaction &dialog, const mask &filtre, const mask &subtree, catalogue &cat, bool info_details, bool empty, statistics &st, bool display_skipped) |
void | filtre_isolate (user_interaction &dialog, catalogue &cat, catalogue &ref, bool info_details) |
void | filtre_merge (user_interaction &dialog, const mask &filtre, const mask &subtree, pile &stack, catalogue &cat, catalogue *ref1, catalogue *ref2, bool info_details, statistics &st, bool make_empty_dir, const mask &ea_mask, const mask &compr_mask, const infinint &min_compr_size, bool display_skipped, bool keep_compressed, const crit_action &overwrite, bool warn_overwrite, bool decremental_mode, const infinint &sparse_file_min_size) |
void | filtre_sequentially_read_all_catalogue (catalogue &cat, user_interaction &dialog, bool lax_read_mode) |
gf_mode | generic_file_get_mode (S_I fd) |
const char * | generic_file_get_name (gf_mode mode) |
std::string | hash_algo_to_string (hash_algo algo) |
void | int_tools_swap_bytes (unsigned char &a, unsigned char &b) |
void | int_tools_swap_bytes (unsigned char *a, U_I size) |
void | int_tools_expand_byte (unsigned char a, int_tools_bitfield &bit) |
void | int_tools_contract_byte (const int_tools_bitfield &b, unsigned char &a) |
template<class T > | |
T | int_tools_rotate_right_one_bit (T v) |
template<class T > | |
T | int_tools_maxof_agregate (T unused) |
void | integer_check () |
checks sign and width of integer types More... | |
bool | integers_system_is_big_endian () |
returns true if the system is big endian, false else More... | |
void | get_version (U_I &major, U_I &medium, U_I &minor, bool init_libgcrypt=true) |
return the libdar version, and make libdar initialization (may throw Exceptions) More... | |
void | get_version_noexcept (U_I &major, U_I &medium, U_I &minor, U_16 &exception, std::string &except_msg, bool init_libgcrypt=true) |
return the libdar version, and make libdar initialization (does not throw exceptions) More... | |
void | close_and_clean () |
archive * | open_archive_noexcept (user_interaction &dialog, const path &chem, const std::string &basename, const std::string &extension, const archive_options_read &options, U_16 &exception, std::string &except_msg) |
this is a wrapper around the archive constructor known as the "read" constructor More... | |
archive * | create_archive_noexcept (user_interaction &dialog, const path &fs_root, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_create &options, statistics *progressive_report, U_16 &exception, std::string &except_msg) |
this is a wrapper around the archive constructor known as the "create" constructor More... | |
archive * | isolate_archive_noexcept (user_interaction &dialog, const path &sauv_path, archive *ref_arch, const std::string &filename, const std::string &extension, const archive_options_isolate &options, U_16 &exception, std::string &except_msg) |
this is a wrapper around the archive constructor known as the "isolate" constructor More... | |
archive * | merge_archive_noexcept (user_interaction &dialog, const path &sauv_path, archive *ref_arch1, const std::string &filename, const std::string &extension, const archive_options_merge &options, statistics *progressive_report, U_16 &exception, std::string &except_msg) |
this is a wrapper around the archive constructor known as the "merging" constructor More... | |
void | close_archive_noexcept (archive *ptr, U_16 &exception, std::string &except_msg) |
this is wrapper around the archive destructor More... | |
statistics | op_extract_noexcept (user_interaction &dialog, archive *ptr, const path &fs_root, const archive_options_extract &options, statistics *progressive_report, U_16 &exception, std::string &except_msg) |
this is wrapper around the op_extract method More... | |
void | op_listing_noexcept (user_interaction &dialog, archive *ptr, const archive_options_listing &options, U_16 &exception, std::string &except_msg) |
this is wrapper around the op_listing method More... | |
statistics | op_diff_noexcept (user_interaction &dialog, archive *ptr, const path &fs_root, const archive_options_diff &options, statistics *progressive_report, U_16 &exception, std::string &except_msg) |
this is wrapper around the op_diff method More... | |
statistics | op_test_noexcept (user_interaction &dialog, archive *ptr, const archive_options_test &options, statistics *progressive_report, U_16 &exception, std::string &except_msg) |
this is wrapper around the op_test method More... | |
bool | get_children_of_noexcept (user_interaction &dialog, archive *ptr, const std::string &dir, U_16 &exception, std::string &except_msg) |
this is wrapper around the get_children_of method More... | |
char * | libdar_str2charptr_noexcept (const std::string &x, U_16 &exception, std::string &except_msg) |
routine provided to convert std::string to char * More... | |
template<class B > | |
limitint< B > | operator+ (const limitint< B > &, const limitint< B > &) |
template<class B > | |
limitint< B > | operator+ (const limitint< B > &a, U_I b) |
template<class B > | |
limitint< B > | operator- (const limitint< B > &, const limitint< B > &) |
template<class B > | |
limitint< B > | operator- (const limitint< B > &a, U_I b) |
template<class B > | |
limitint< B > | operator* (const limitint< B > &, const limitint< B > &) |
template<class B > | |
limitint< B > | operator* (const limitint< B > &a, U_I b) |
template<class B > | |
limitint< B > | operator/ (const limitint< B > &, const limitint< B > &) |
template<class B > | |
limitint< B > | operator/ (const limitint< B > &a, U_I b) |
template<class B > | |
limitint< B > | operator% (const limitint< B > &, const limitint< B > &) |
template<class B > | |
limitint< B > | operator>> (const limitint< B > &a, U_32 bit) |
template<class B > | |
limitint< B > | operator>> (const limitint< B > &a, const limitint< B > &bit) |
template<class B > | |
limitint< B > | operator<< (const limitint< B > &a, U_32 bit) |
template<class B > | |
limitint< B > | operator<< (const limitint< B > &a, const limitint< B > &bit) |
template<class B > | |
limitint< B > | operator& (const limitint< B > &a, U_32 bit) |
template<class B > | |
limitint< B > | operator& (const limitint< B > &a, const limitint< B > &bit) |
template<class B > | |
limitint< B > | operator| (const limitint< B > &a, U_32 bit) |
template<class B > | |
limitint< B > | operator| (const limitint< B > &a, const limitint< B > &bit) |
template<class B > | |
limitint< B > | operator^ (const limitint< B > &a, U_32 bit) |
template<class B > | |
limitint< B > | operator^ (const limitint< B > &a, const limitint< B > &bit) |
template<class T > | |
void | euclide (T a, T b, T &q, T &r) |
template<class B > | |
void | euclide (limitint< B > a, U_I b, limitint< B > &q, limitint< B > &r) |
void | macro_tools_open_archive (user_interaction &dialog, const path &sauv_path, 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 sequential_read, bool info_details) |
catalogue * | macro_tools_get_derivated_catalogue_from (user_interaction &dialog, pile &data_stack, pile &cata_stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, bool lax_mode) |
catalogue * | macro_tools_get_catalogue_from (user_interaction &dialog, pile &stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, bool lax_mode) |
catalogue * | macro_tools_lax_search_catalogue (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 | macro_tools_get_terminator_start (generic_file &f, const archive_version &reading_ver) |
infinint | operator+ (const infinint &, const infinint &) |
infinint | operator- (const infinint &, const infinint &) |
infinint | operator* (const infinint &, const infinint &) |
infinint | operator* (const infinint &, const unsigned char) |
infinint | operator* (const unsigned char, const infinint &) |
infinint | operator/ (const infinint &, const infinint &) |
infinint | operator% (const infinint &, const infinint &) |
infinint | operator& (const infinint &a, const infinint &bit) |
infinint | operator| (const infinint &a, const infinint &bit) |
infinint | operator^ (const infinint &a, const infinint &bit) |
infinint | operator>> (const infinint &a, U_32 bit) |
infinint | operator>> (const infinint &a, const infinint &bit) |
infinint | operator<< (const infinint &a, U_32 bit) |
infinint | operator<< (const infinint &a, const infinint &bit) |
void | euclide (infinint a, const infinint &b, infinint &q, infinint &r) |
std::string | 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 | |
trivial_sar * | sar_tools_open_archive_tuyau (user_interaction &dialog, S_I fd, gf_mode mode, const label &data_name, bool slice_header_format_07, const std::string &execute) |
create an container to write a archive to a pipe | |
void | tools_init () |
libdar internal use only: it is launched from get_version() and initializes tools internal variables | |
void | tools_end () |
libdar internal use only: it is launched from close_and_clean() and releases tools internal variables | |
char * | tools_str2charptr (const std::string &x) |
convert a string to a char * More... | |
void | tools_write_string (generic_file &f, const std::string &s) |
write a string to a file with a '\0' at then end More... | |
void | tools_read_string (generic_file &f, std::string &s) |
read a string from a file expecting it to terminate by '\0' More... | |
void | 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 | 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 | tools_get_filesize (const path &p) |
retrieve the size in byte of a file More... | |
infinint | 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... | |
void | tools_extract_basename (const char *command_name, std::string &basename) |
extracts the basename of a file (removing path part) More... | |
std::string::iterator | 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... | |
std::string::iterator | tools_find_first_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 | tools_split_path_basename (const char *all, path *&chemin, std::string &base) |
split a given full path in path part and basename part More... | |
void | tools_split_path_basename (const std::string &all, std::string &chemin, std::string &base) |
split a given full path in path part and basename part More... | |
void | tools_open_pipes (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... | |
void | tools_blocking_read (int fd, bool mode) |
set blocking/not blocking mode for reading on a file descriptor More... | |
std::string | tools_name_of_uid (const infinint &uid) |
convert uid to name in regards to the current system's configuration More... | |
std::string | tools_name_of_gid (const infinint &gid) |
convert gid to name in regards of the current system's configuration More... | |
std::string | tools_uword2str (U_16 x) |
convert unsigned word to string More... | |
std::string | tools_int2str (S_I x) |
convert integer to string More... | |
U_I | tools_str2int (const std::string &x) |
convert an integer written in decimal notation to the corresponding value More... | |
S_I | tools_str2signed_int (const std::string &x) |
convert a signed integer written in decimal notation to the corresponding value More... | |
bool | tools_my_atoi (const char *a, U_I &val) |
ascii to integer conversion More... | |
std::string | tools_addspacebefore (std::string s, U_I expected_size) |
prepend spaces before the given string More... | |
std::string | tools_display_date (infinint date) |
convert a date in second to its human readable representation More... | |
infinint | tools_convert_date (const std::string &repres) |
convert a human readable date representation in number of second since the system reference date More... | |
void | tools_system (user_interaction &dialog, const std::vector< std::string > &argvector) |
wrapper to the "system" system call. More... | |
void | tools_system_with_pipe (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 | tools_write_vector (generic_file &f, const std::vector< std::string > &x) |
write a list of string to file More... | |
void | tools_read_vector (generic_file &f, std::vector< std::string > &x) |
read a list of string from a file More... | |
std::string | 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 > | operator+ (std::vector< std::string > a, std::vector< std::string > b) |
concatenate two vectors More... | |
bool | tools_is_member (const std::string &val, const std::vector< std::string > &liste) |
test the presence of a value in a list More... | |
void | tools_display_features (user_interaction &dialog, bool ea, bool largefile, bool nodump, bool special_alloc, U_I bits, bool thread_safe, bool libz, bool libbz2, bool liblzo2, bool libcrypto, bool furtive_read) |
display the compilation time features of libdar More... | |
void | tools_display_features (user_interaction &dialog) |
display the compilation time features of libdar More... | |
bool | tools_is_equal_with_hourshift (const infinint &hourshift, const infinint &date1, const infinint &date2) |
test if two dates are equal taking care of a integer hour of difference More... | |
template<class T > | |
std::vector< T > | operator+= (std::vector< T > &a, const std::vector< T > &b) |
template function to add two vectors | |
const char * | tools_get_from_env (const char **env, const char *clef) |
isolate the value of a given variable from the environment vector More... | |
void | tools_check_basename (user_interaction &dialog, const path &loc, std::string &base, const std::string &extension) |
does sanity checks on a slice name, check presence and detect whether the given basename is not rather a filename More... | |
std::string | tools_getcwd () |
get current working directory | |
std::string | tools_readlink (const char *root) |
returns the file pointed to by a symbolic link (or transparent if the file is not a symlink). More... | |
bool | tools_look_for (const char *argument, S_I argc, char *const argv[]) |
test the presence of an argument More... | |
void | tools_noexcept_make_date (const std::string &chem, const infinint &last_acc, const infinint &last_mod) |
set dates of a given file, no exception thrown More... | |
void | tools_make_date (const std::string &chemin, infinint access, infinint modif) |
set dates of a given file, may throw exception More... | |
bool | tools_is_case_insensitive_equal (const std::string &a, const std::string &b) |
compare two string in case insensitive manner More... | |
void | tools_to_upper (const std::string &r, std::string &uppered) |
convert a string to upper case More... | |
void | tools_remove_last_char_if_equal_to (char c, std::string &s) |
remove last character of a string is it equal to a given value More... | |
void | tools_read_range (const std::string &s, S_I &min, U_I &max) |
from a string with a range notation (min-max) extract the range values More... | |
std::string | tools_printf (const char *format,...) |
make printf-like formating to a std::string More... | |
std::string | tools_vprintf (const char *format, va_list ap) |
make printf-like formating to a std::string More... | |
bool | tools_do_some_files_match_mask_regex (user_interaction &ui, const std::string &c_chemin, const std::string &file_mask) |
test the presence of files corresponding to a given mask in a directory (regex mask) More... | |
void | tools_unlink_file_mask_regex (user_interaction &dialog, const std::string &c_chemin, const std::string &file_mask, bool info_details) |
remove files from a given directory More... | |
void | tools_avoid_slice_overwriting_regex (user_interaction &dialog, const path &chemin, 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... | |
void | tools_add_elastic_buffer (generic_file &f, U_32 max_size) |
append an elastic buffer of given size to the file More... | |
bool | 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 | tools_relative2absolute_path (const path &src, const path &cwd) |
transform a relative path to an absolute one given the current directory value More... | |
void | tools_block_all_signals (sigset_t &old_mask) |
block all signals (based on POSIX sigprocmask) More... | |
void | tools_set_back_blocked_signals (sigset_t old_mask) |
unblock signals according to given mask More... | |
U_I | tools_count_in_string (const std::string &s, const char a) |
counts the number of a given char in a given string More... | |
infinint | tools_get_mtime (const std::string &s) |
returns the last modification date of the given file More... | |
infinint | tools_get_size (const std::string &s) |
returns the size of the given plain file More... | |
infinint | tools_get_ctime (const std::string &s) |
returns the last change date of the given file More... | |
std::vector< std::string > | tools_split_in_words (generic_file &f) |
read a file and split its contents in words More... | |
bool | tools_find_next_char_out_of_parenthesis (const std::string &data, const char what, U_32 start, U_32 &found) |
look next char in string out of parenthesis More... | |
std::string | 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 | 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) |
produces the string resulting from the substitution of %... macro More... | |
void | tools_hook_execute (user_interaction &ui, const std::string &cmd_line) |
execute and retries at user will a given command line More... | |
void | 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) |
subsititue and execute command line More... | |
std::string | tools_build_regex_for_exclude_mask (const std::string &prefix, const std::string &relative_part) |
builds a regex from root directory and user provided regex to be applied to the relative path More... | |
std::string | tools_output2xml (const std::string &src) |
convert string for xml output More... | |
U_I | tools_octal2int (const std::string &perm) |
convert octal string to integer More... | |
std::string | tools_int2octal (const U_I &perm) |
convert a number to a string corresponding to its octal representation More... | |
void | tools_set_permission (S_I fd, U_I perm) |
change the permission of the file which descriptor is given More... | |
U_I | tools_get_permission (S_I fd) |
obtain the permission of the file which descriptor is given More... | |
void | tools_set_ownership (S_I fd, const std::string &slice_user, const std::string &slice_group) |
change ownership of the file which descriptor is given More... | |
void | tools_memxor (void *dest, const void *src, U_I n) |
Produces in "dest" the XORed value of "dest" and "src". More... | |
tlv_list | 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... | |
void | tools_read_from_pipe (user_interaction &dialog, S_I fd, tlv_list &result) |
Extract from anonymous pipe a tlv_list. More... | |
U_I | tools_pseudo_random (U_I max) |
Produces a pseudo random number x, where 0 <= x < max. More... | |
template<class N , class B > | |
std::vector< B > | 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 | tools_unsigned_char_to_hexa (unsigned char x) |
convert a unsigned char into its hexa decima representation More... | |
std::string | tools_string_to_hexa (const std::string &input) |
convert a string into its hexadecima representation More... | |
infinint | tools_file_size_to_crc_size (const infinint &size) |
Defines the CRC size to use for a given filesize. More... | |
std::string | tools_get_euid () |
return a string containing the Effective UID | |
std::string | tools_get_egid () |
return a string containing the Effective UID | |
std::string | tools_get_hostname () |
return a string containing the hostname of the current host | |
std::string | tools_get_date_utc () |
return a string containing the current time (UTC) | |
std::string | tools_get_compression_ratio (const infinint &storage_size, const infinint &file_size) |
return the string about compression ratio | |
std::string | 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 | |
Variables | |
const U_32 | SAUV_MAGIC_NUMBER = 123 |
const U_I | VERSION_FLAG_SAVED_EA_ROOT = 0x80 |
const U_I | VERSION_FLAG_SAVED_EA_USER = 0x40 |
const U_I | VERSION_FLAG_SCRAMBLED = 0x20 |
const U_I | VERSION_FLAG_SEQUENCE_MARK = 0x10 |
const U_I | VERSION_FLAG_INITIAL_OFFSET = 0x08 |
const U_I | VERSION_FLAG_HAS_AN_EXTENDED_SIZE = 0x01 |
const U_I | VERSION_SIZE = 3 |
const U_I | HEADER_CRC_SIZE = 2 |
const label | label_zero |
const U_I | LIBDAR_COMPILE_TIME_MAJOR = 5 |
libdar Major version defined at compilation time | |
const U_I | LIBDAR_COMPILE_TIME_MEDIUM = 6 |
libdar Medium version defined at compilation time | |
const U_I | LIBDAR_COMPILE_TIME_MINOR = 7 |
libdar Minor version defined at compilation time | |
const archive_version | macro_tools_supported_version |
const std::string | LIBDAR_STACK_LABEL_UNCOMPRESSED |
const std::string | LIBDAR_STACK_LABEL_CLEAR |
const std::string | LIBDAR_STACK_LABEL_UNCYPHERED |
const std::string | LIBDAR_STACK_LABEL_LEVEL1 |
const int | WR_OK = 0 |
const int | WR_MEM_ERROR = 1 |
const int | WR_VERSION_ERROR = 2 |
const int | WR_STREAM_ERROR = 3 |
const int | WR_DATA_ERROR = 4 |
const int | WR_NO_FLUSH = 5 |
const int | WR_BUF_ERROR = 6 |
const int | WR_STREAM_END = 7 |
const int | WR_FINISH = 8 |
libdar namespace encapsulate all libdar symbols
lookup routine to find a pointer to the dat_dir object corresponding to the given path
[in] | chemin | is the path to look for |
[in] | racine | is the database to look into |
[out] | ptr | is a pointer to the looked node if found |
generic_file* libdar::database_header_open | ( | user_interaction & | dialog, |
const std::string & | filename, | ||
unsigned char & | db_version | ||
) |
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 |
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 |
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 |
void libdar::integer_check | ( | ) |
checks sign and width of integer types
bool libdar::integers_system_is_big_endian | ( | ) |
returns true if the system is big endian, false else