 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
30 #include "../my_config.h"
70 #define LIBDAR_XXXXXXXX
73 #define LIBDAR_NOEXCEPT 0
74 #define LIBDAR_EMEMORY 1
78 #define LIBDAR_EINFININT 3
80 #define LIBDAR_ELIMITINT 4
82 #define LIBDAR_ERANGE 5
84 #define LIBDAR_EDECI 6
86 #define LIBDAR_EFEATURE 7
88 #define LIBDAR_EHARDWARE 8
90 #define LIBDAR_EUSER_ABORT 9
92 #define LIBDAR_EDATA 10
94 #define LIBDAR_ESCRIPT 11
96 #define LIBDAR_ELIBCALL 12
98 #define LIBDAR_UNKNOWN 13
100 #define LIBDAR_ECOMPILATION 14
102 #define LIBDAR_THREAD_CANCEL 15
159 constexpr
compression lzo1x_1_15 = compression::lzo1x_1_15;
160 constexpr
compression lzo1x_1 = compression::lzo1x_1;
169 constexpr
crypto_algo crypto_none = crypto_algo::none;
170 constexpr
crypto_algo crypto_scrambling = crypto_algo::scrambling;
171 constexpr
crypto_algo crypto_blowfish = crypto_algo::blowfish;
172 constexpr
crypto_algo crypto_aes256 = crypto_algo::aes256;
173 constexpr
crypto_algo crypto_twofish256 = crypto_algo::twofish256;
174 constexpr
crypto_algo crypto_serpent256 = crypto_algo::serpent256;
175 constexpr
crypto_algo crypto_camellia256 = crypto_algo::camellia256;
193 constexpr
capa_status capa_set = libdar::capa_status::capa_set;
194 constexpr
capa_status capa_clear = libdar::capa_status::capa_clear;
195 constexpr
capa_status capa_unknown = libdar::capa_status::capa_unknown;
241 using libdar::crit_or;
242 using libdar::crit_invert;
246 constexpr
over_action_data data_preserve = libdar::over_action_data::data_preserve;
247 constexpr
over_action_data data_overwrite = libdar::over_action_data::data_overwrite;
248 constexpr
over_action_data data_preserve_mark_already_saved = libdar::over_action_data::data_preserve_mark_already_saved;
249 constexpr
over_action_data data_overwrite_mark_already_saved = libdar::over_action_data::data_overwrite_mark_already_saved;
250 constexpr
over_action_data data_remove = libdar::over_action_data::data_remove;
251 constexpr
over_action_data data_undefined = libdar::over_action_data::data_undefined;
255 constexpr
over_action_ea EA_preserve = libdar::over_action_ea::EA_preserve;
256 constexpr
over_action_ea EA_overwrite = libdar::over_action_ea::EA_overwrite;
257 constexpr
over_action_ea EA_clear = libdar::over_action_ea::EA_clear;
258 constexpr
over_action_ea EA_preserve_mark_already_saved = libdar::over_action_ea::EA_preserve_mark_already_saved;
259 constexpr
over_action_ea EA_overwrite_mark_already_saved = libdar::over_action_ea::EA_overwrite_mark_already_saved;
260 constexpr
over_action_ea EA_merge_preserve = libdar::over_action_ea::EA_merge_preserve;
261 constexpr
over_action_ea EA_merge_overwrite = libdar::over_action_ea::EA_merge_overwrite;
262 constexpr
over_action_ea EA_undefined = libdar::over_action_ea::EA_undefined;
275 constexpr
hash_algo hash_none = hash_algo::none;
276 constexpr
hash_algo hash_md5 = hash_algo::md5;
277 constexpr
hash_algo hash_sha1 = hash_algo::sha1;
278 constexpr
hash_algo hash_sha512= hash_algo::sha512;
282 constexpr
fsa_family fsaf_hfs_plus = fsa_family::fsaf_hfs_plus;
283 constexpr
fsa_family fsaf_linux_extX = fsa_family::fsaf_linux_extX;
286 constexpr
fsa_nature fsan_unset = fsa_nature::fsan_unset;
287 constexpr
fsa_nature fsan_creation_date = fsa_nature::fsan_creation_date;
288 constexpr
fsa_nature fsan_append_only = fsa_nature::fsan_append_only;
289 constexpr
fsa_nature fsan_compressed = fsa_nature::fsan_compressed;
290 constexpr
fsa_nature fsan_no_dump = fsa_nature::fsan_no_dump;
291 constexpr
fsa_nature fsan_immutable = fsa_nature::fsan_immutable;
292 constexpr
fsa_nature fsan_data_journaling = fsa_nature::fsan_data_journaling;
293 constexpr
fsa_nature fsan_secure_deletion = fsa_nature::fsan_secure_deletion;
294 constexpr
fsa_nature fsan_no_tail_merging = fsa_nature::fsan_no_tail_merging;
295 constexpr
fsa_nature fsan_undeletable = fsa_nature::fsan_undeletable;
296 constexpr
fsa_nature fsan_noatime_update = fsa_nature::fsan_noatime_update;
297 constexpr
fsa_nature fsan_synchronous_directory = fsa_nature::fsan_synchronous_directory;
298 constexpr
fsa_nature fsan_synchronous_udpdate = fsa_nature::fsan_synchronous_update;
299 constexpr
fsa_nature fsan_top_of_dir_hierarchy = fsa_nature::fsan_top_of_dir_hierarchy;
307 constexpr
gf_mode gf_read_only = gf_mode::gf_read_only;
308 constexpr
gf_mode gf_write_only = gf_mode::gf_write_only;
309 constexpr
gf_mode gf_read_write = gf_mode::gf_read_write;
319 namespace compile_time
386 extern void get_version(U_I & major, U_I & medium, U_I & minor,
bool init_libgcrypt =
true);
401 extern void get_version_noexcept(U_I & major, U_I & medium, U_I & minor, U_16 & exception, std::string & except_msg,
bool init_libgcrypt =
true);
417 extern void close_and_clean();
435 const path & chem,
const std::string & basename,
436 const std::string & extension,
437 const archive_options_read & options,
439 std::string & except_msg);
448 const path & fs_root,
449 const path & sauv_path,
450 const std::string & filename,
451 const std::string & extension,
452 const archive_options_create & options,
455 std::string & except_msg);
466 const path &sauv_path,
467 const std::string & filename,
468 const std::string & extension,
469 const archive_options_isolate & options,
471 std::string & except_msg);
479 const path & sauv_path,
481 const std::string & filename,
482 const std::string & extension,
483 const archive_options_merge & options,
486 std::string & except_msg);
496 std::string & except_msg);
510 std::string & except_msg);
520 const archive_options_listing & options,
522 std::string & except_msg);
532 const path & fs_root,
533 const archive_options_diff & options,
536 std::string & except_msg);
549 std::string & except_msg);
559 const std::string & dir,
561 std::string & except_msg);
595 extern void cancel_thread(pthread_t tid,
bool immediate =
true, U_64 flag = 0);
601 extern bool cancel_status(pthread_t tid);
608 extern bool cancel_clear(pthread_t tid);
std::string tools_getcwd()
get current working directory
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
hash_algo
hashing algorithm available
exception used when arithmetic error is detected when operating on infinint
here lies a collection of mask classes
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
compression
the different compression algorithm available
provide information about current thread (underlying using the widthdrawn POSIX.1e API)
capa_status
the EFFECTIVE set the value of the associated capability for the calling thread
the mask_list class, matches string that are present in a given file
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
const U_I LIBDAR_COMPILE_TIME_MINOR
libdar Minor version defined at compilation time
compression char2compression(char a)
convert a char as stored in archive to its compression value
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
class to be used as parent to provide checkpoints to inherited classes
makes an AND operator between two or more masks
defines the interaction interface between libdar and users.
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
are defined here basic integer types that tend to be portable
gf_mode
generic_file openning modes
defines the implementation for local filesystem entrepot The entrepot_local is the only implementatio...
the basic constant action
switch module to limitint (32 ou 64 bits integers) or infinint
the arbitrary large positive integer class
exception used when a requested feature is not (yet) implemented
makes the OR operator between two or more masks
defines the implementation for remote filesystem entrepot using libcurl
If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mti...
if the entry is not an inode the result is also true
defines the implementation of pipe under the generic_file interface.
nested namespace containing routines that give features activated at compile time
exception used when a limitint overflow is detected, the maximum value of the limitint has been excee...
returns true if the first entry is a inode with several hard links (whatever is the second entry)
char compression2char(compression c)
convert a compression value to a char for storing in archive
the archive class realizes the most general operations on archives
the generic class, parent of all masks
over_action_ea
the possible action for overwriting EA
exception used when hardware problem is found
compression char2compression(char a)
convert a char as stored in archive to its compression value
fsa_scope all_fsa_families()
provides a scope containing all FSA families
returns true if the EA of the first entry is more recent or equal to the one of the second entry
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value
holds the statistics contents of a catalogue
infinint tools_get_extended_size(std::string s, U_I base)
convert the given string to infinint taking care of multiplication suffixes like k,...
std::string tools_printf(const char *format,...)
make printf-like formating to a std::string
returns true if the first entry has more or even EA (in number not in size) than the second entry
return true if the entry is a dirty file (or hard linked dirty file)
the generic criterium class, parent of all criterium
pipe implementation under the generic_file interface.
exception used to signal that the user has aborted the operation
this file holds the database class definition as defined in API version 5
to be able to cancel libdar operation while running in a given thread.
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
U_I tools_octal2int(const std::string &perm)
convert octal string to integer
exception used when a requested fearture has not beed activated at compilation time
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
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
API v5 backward compatible class archive.
matches regular expressions (see "man 7 regex")
bool tools_my_atoi(const char *a, U_I &val)
ascii to integer conversion
here lies a mask that selects files present in a given list
exception used when memory has been exhausted
matches if string is the given constructor string or a sub directory of it
the class path is here to manipulate paths in the Unix notation: using'/'
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
class used by libdar::archive class to give a summary of treated file during and after an operation
This is a pure virtual class that is used by libdar when interaction with the user is required.
libdar5 namespace encapsulate all libdar symbols
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value
class handling access to the data summary of treated files after and during each operation
decimal class, convert infinint from and to decimal represention
set of datastructures used to interact with a catalogue object
class holding optional parameters used to test the structure coherence of an existing archive
generic_file stored in memory
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)
exception used when an error concerning the treated data has been met
std::string compression2string(compression c)
convert a compression to its string representation
returns true if the first entry is an inode (whatever is the second)
this is the interface class from which all other data transfer classes inherit
exception used to signal range error
realises the AND operator
exception used to signal an error in the argument given to libdar call of the API
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)
exception used when secure memory has been exhausted
char * libdar_str2charptr_noexcept(const std::string &x, U_16 &exception, std::string &except_msg)
routine provided to convert std::string to char *
return true if the entry is a sparse file (or hard linked sparse file)
nested namespace inside libdar
mycurl_protocol
libcurl protocols supported by libdar
comparison_fields
how to consider file change during comparison and incremental backup
base classes used to store entree information in dar_manager databases
archive * isolate_archive_noexcept(user_interaction &dialog, archive *ptr, const path &sauv_path, 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
exception used when error the inter-slice user command returned an error code
class archive_num stores the position of an archive inside a dar_manager database
const U_I LIBDAR_COMPILE_TIME_MEDIUM
libdar Medium version defined at compilation time
this is the parent class of all exception classes.
API v5 backward compatible user_interaction_callback class.
crypto_algo
the different cypher available for encryption (strong or weak)
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
fsa_scope all_fsa_families()
provides a scope containing all FSA families
realises the negation of the criterium given in argument to its constructor
returns true if the data of the first entry is more recent or of the same date of the one of the seco...
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
exception used to carry system error
boolean mask, either always true or false
return true if the entry has delta signatur
returns true if the first entry is a cat_directory (whatever is the second)
exception used when the thread libdar is running in is asked to stop
void close_archive_noexcept(archive *ptr, U_16 &exception, std::string &except_msg)
this is wrapper around the archive destructor
exception used to signal convertion problem between infinint and string (decimal representation)
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument...
the crypto algoritm definition
manages the decimal representation of infinint
class fichier_local definition. This is a full implementation/inherited class of class fichier_global...
here is the definition of the path class
the testing class binds criterium to actions
modified_data_detection
how to detect data has changed when some fields
the crit_chain class sequences crit_actions up to full definition of the action
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
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
returns true if the data of the first entry is bigger or equal to the one of the second entry
matches if string is exactly the given mask (no wilde card expression)
the global action for overwriting
matches as done on shell command lines (see "man 7 glob")
string matches if it is subdir of mask or mask is a subdir of expression
over_action_data
the possible actions for overwriting data
compression engine implementation
const U_I LIBDAR_COMPILE_TIME_MAJOR
libdar Major version defined at compilation time
returns true if the first entry is a plain file (whatever is the second)
std::set< fsa_family > fsa_scope
set of fsa families