Disk ARchive  2.6.0
Full featured and portable backup and archiving tool
libdar5.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2018 Denis Corbin
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21 
25 
26 
27 #ifndef LIBDAR5_HPP
28 #define LIBDAR5_HPP
29 
30 #include "../my_config.h"
31 
32 extern "C"
33 {
34 #if MUTEX_WORKS
35 #if HAVE_PTHREAD_H
36 #include <pthread.h>
37 #endif
38 #endif
39 }
40 
41 #include <string>
42 #include "compressor.hpp"
43 #include "path.hpp"
44 #include "mask.hpp"
45 #include "mask_list.hpp"
46 #include "integers.hpp"
47 #include "infinint.hpp"
48 #include "statistics.hpp"
49 #include "user_interaction.hpp"
51 #include "deci.hpp"
52 #include "archive5.hpp"
53 #include "crypto.hpp"
54 #include "thread_cancellation.hpp"
56 #include "capabilities.hpp"
57 #include "entrepot_libcurl5.hpp"
58 #include "fichier_local.hpp"
59 #include "entrepot_local.hpp"
60 #include "data_tree.hpp"
61 #include "database5.hpp"
62 #include "tuyau.hpp"
63 #include "archive_aux.hpp"
64 #include "tools.hpp"
65 
68 
70 #define LIBDAR_XXXXXXXX
71 
73 #define LIBDAR_NOEXCEPT 0
74 #define LIBDAR_EMEMORY 1
76 #define LIBDAR_EBUG 2
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
104 
107 namespace libdar5
108 {
111 
112  // from integers.hpp
113  using libdar::U_8;
114  using libdar::U_16;
115  using libdar::U_32;
116  using libdar::U_64;
117  using libdar::U_I;
118  using libdar::S_8;
119  using libdar::S_16;
120  using libdar::S_32;
121  using libdar::S_64;
122  using libdar::S_I;
123 
124  // from infinint.hpp
125  using libdar::infinint;
126 
127  // from erreurs.hpp
128  using libdar::Egeneric;
129  using libdar::Ememory;
130  using libdar::Esecu_memory;
131  using libdar::Ebug;
132  using libdar::Einfinint;
133  using libdar::Elimitint;
134  using libdar::Edeci;
135  using libdar::Erange;
136  using libdar::Efeature;
137  using libdar::Ehardware;
138  using libdar::Edata;
139  using libdar::Euser_abort;
140  using libdar::Escript;
141  using libdar::Elibcall;
142  using libdar::Ecompilation;
144  using libdar::Esystem;
145 
146  // from secu_string.hpp
147  using libdar::secu_string;
148 
149  // from path.hpp
150  using libdar::path;
151 
152  // from compressor.hpp
153  using libdar::compression;
154  constexpr compression none = compression::none;
155  constexpr compression gzip = compression::gzip;
156  constexpr compression bzip2 = compression::bzip2;
157  constexpr compression lzo = compression::lzo;
158  constexpr compression xz = compression::xz;
159  constexpr compression lzo1x_1_15 = compression::lzo1x_1_15;
160  constexpr compression lzo1x_1 = compression::lzo1x_1;
161 
163  inline char compression2char(compression c) { return libdar::compression2char(c); }
164  inline std::string compression2string(compression c) { return libdar::compression2string(c); }
165  inline compression string2compression(const std::string & a) { return libdar::string2compression(a); }
166 
167  // from crypto.hpp
168  using libdar::crypto_algo;
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;
176 
177  using libdar::signator;
178 
179  // from statistics.hpp
180  using libdar::statistics;
181 
182  // from list_entry.hpp
183  using libdar::list_entry;
184 
185  // from archive.hpp
186  // using libdar::archive;
187 
188  // from capabilities.hpp
189  using libdar::capa_status;
190  constexpr capa_status capa_set = libdar::capa_status::capa_set;
191  constexpr capa_status capa_clear = libdar::capa_status::capa_clear;
192  constexpr capa_status capa_unknown = libdar::capa_status::capa_unknown;
193 
194  // from mask.hpp
195  using libdar::mask;
196  using libdar::bool_mask;
197  using libdar::simple_mask;
198  using libdar::regular_mask;
199  using libdar::not_mask;
200  using libdar::et_mask;
201  using libdar::ou_mask;
205 
206  // from deci.hpp
207  using libdar::deci;
208 
209  // from thread_cancellation
211 
212  // from data_tree.hpp
213  using libdar::archive_num;
214 
215  // from criterium.hpp
216  using libdar::criterium;
236  using libdar::crit_not;
237  using libdar::crit_and;
238  using libdar::crit_or;
239  using libdar::crit_invert;
240 
241  // from crit_action.hpp
243  constexpr over_action_data data_preserve = libdar::over_action_data::data_preserve;
244  constexpr over_action_data data_overwrite = libdar::over_action_data::data_overwrite;
245  constexpr over_action_data data_preserve_mark_already_saved = libdar::over_action_data::data_preserve_mark_already_saved;
246  constexpr over_action_data data_overwrite_mark_already_saved = libdar::over_action_data::data_overwrite_mark_already_saved;
247  constexpr over_action_data data_remove = libdar::over_action_data::data_remove;
248  constexpr over_action_data data_undefined = libdar::over_action_data::data_undefined;
249  constexpr over_action_data data_ask = libdar::over_action_data::data_ask;
250 
252  constexpr over_action_ea EA_preserve = libdar::over_action_ea::EA_preserve;
253  constexpr over_action_ea EA_overwrite = libdar::over_action_ea::EA_overwrite;
254  constexpr over_action_ea EA_clear = libdar::over_action_ea::EA_clear;
255  constexpr over_action_ea EA_preserve_mark_already_saved = libdar::over_action_ea::EA_preserve_mark_already_saved;
256  constexpr over_action_ea EA_overwrite_mark_already_saved = libdar::over_action_ea::EA_overwrite_mark_already_saved;
257  constexpr over_action_ea EA_merge_preserve = libdar::over_action_ea::EA_merge_preserve;
258  constexpr over_action_ea EA_merge_overwrite = libdar::over_action_ea::EA_merge_overwrite;
259  constexpr over_action_ea EA_undefined = libdar::over_action_ea::EA_undefined;
260  constexpr over_action_ea EA_ask = libdar::over_action_ea::EA_ask;
261 
262  using libdar::crit_action;
264  using libdar::testing;
265  using libdar::crit_chain;
266 
267  // from mask_list.hpp
268  using libdar::mask_list;
269 
270  // from hash_fichier.hpp
271  using libdar::hash_algo;
272  constexpr hash_algo hash_none = hash_algo::none;
273  constexpr hash_algo hash_md5 = hash_algo::md5;
274  constexpr hash_algo hash_sha1 = hash_algo::sha1;
275  constexpr hash_algo hash_sha512= hash_algo::sha512;
276 
277  // from fsa_family.hpp
278  using libdar::fsa_family;
279  constexpr fsa_family fsaf_hfs_plus = fsa_family::fsaf_hfs_plus;
280  constexpr fsa_family fsaf_linux_extX = fsa_family::fsaf_linux_extX;
281 
282  using libdar::fsa_nature;
283  constexpr fsa_nature fsan_unset = fsa_nature::fsan_unset;
284  constexpr fsa_nature fsan_creation_date = fsa_nature::fsan_creation_date;
285  constexpr fsa_nature fsan_append_only = fsa_nature::fsan_append_only;
286  constexpr fsa_nature fsan_compressed = fsa_nature::fsan_compressed;
287  constexpr fsa_nature fsan_no_dump = fsa_nature::fsan_no_dump;
288  constexpr fsa_nature fsan_immutable = fsa_nature::fsan_immutable;
289  constexpr fsa_nature fsan_data_journaling = fsa_nature::fsan_data_journaling;
290  constexpr fsa_nature fsan_secure_deletion = fsa_nature::fsan_secure_deletion;
291  constexpr fsa_nature fsan_no_tail_merging = fsa_nature::fsan_no_tail_merging;
292  constexpr fsa_nature fsan_undeletable = fsa_nature::fsan_undeletable;
293  constexpr fsa_nature fsan_noatime_update = fsa_nature::fsan_noatime_update;
294  constexpr fsa_nature fsan_synchronous_directory = fsa_nature::fsan_synchronous_directory;
295  constexpr fsa_nature fsan_synchronous_udpdate = fsa_nature::fsan_synchronous_update;
296  constexpr fsa_nature fsan_top_of_dir_hierarchy = fsa_nature::fsan_top_of_dir_hierarchy;
297 
298  using libdar::fsa_scope;
300 
301  // from generic_file.hpp
302  using libdar::generic_file;
303  using libdar::gf_mode;
304  constexpr gf_mode gf_read_only = gf_mode::gf_read_only;
305  constexpr gf_mode gf_write_only = gf_mode::gf_write_only;
306  constexpr gf_mode gf_read_write = gf_mode::gf_read_write;
307 
308  // from tools.hpp
309  using libdar::tools_printf;
310  using libdar::tools_getcwd;
312  using libdar::tools_my_atoi;
314 
315  // from compile_time_features.hpp
316  namespace compile_time
317  {
318  using namespace libdar::compile_time;
319  }
320 
321  // from fichier_local.hpp
322  using libdar::fichier_local;
323 
324  // from mycurl_protocol.hpp
326  constexpr mycurl_protocol proto_ftp = mycurl_protocol::proto_ftp;
327  constexpr mycurl_protocol proto_sftp = mycurl_protocol::proto_sftp;
328 
329  inline mycurl_protocol string_to_mycurl_protocol(const std::string & arg) { return libdar::string_to_mycurl_protocol(arg); }
330 
331  // from memory_file.hpp
332  using libdar::memory_file;
333 
334  // from entrepot_local
336 
337  // from datetime
338  using libdar::datetime;
339 
340  // from tuyau
341  using libdar::tuyau;
342 
343  // from archive_aux.hpp
346  constexpr comparison_fields cf_all = comparison_fields::all;
347  constexpr comparison_fields cf_ignore_owner = comparison_fields::ignore_owner;
348  constexpr comparison_fields cf_mtime = comparison_fields::mtime;
349  constexpr comparison_fields cf_inode_type = comparison_fields::inode_type;
350 
354  const U_I LIBDAR_COMPILE_TIME_MEDIUM = 100;
357 
359  // LIBDAR INITIALIZATION METHODS //
360  // //
361  // A FUNCTION OF THE get_version*() FAMILY *MUST* BE CALLED //
362  // BEFORE ANY OTHER FUNCTION OF THIS LIBRARY //
363  // //
364  // CLIENT PROGRAM MUST CHECK THAT THE MAJOR NUMBER RETURNED //
365  // BY THIS CALL IS NOT GREATER THAN THE VERSION USED AT COMPILATION //
366  // TIME. IF SO, THE PROGRAM MUST ABORT AND RETURN A WARNING TO THE //
367  // USER TELLING THE DYNAMICALLY LINKED VERSION IS TOO RECENT AND NOT //
368  // COMPATIBLE WITH THIS SOFTWARE. THE MESSAGE MUST INVITE THE USER //
369  // TO UPGRADE HIS SOFTWARE WITH A MORE RECENT VERSION COMPATIBLE WITH //
370  // THIS LIBDAR RELEASE. //
372 
374 
383  extern void get_version(U_I & major, U_I & medium, U_I & minor, bool init_libgcrypt = true);
384 
386 
398  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);
399 
400 
401 
403  // CLOSING/CLEANING LIBDAR //
405 
406  // while libdar has only a single boolean as global variable
407  // that defines whether the library is initialized or not
408  // it must proceed to mutex, and dependent libraries initializations
409  // (liblzo, libgcrypt, etc.), which is done during the get_version() call
410  // Some library also need to clear some data so the following call
411  // is provided in that aim and must be called when libdar will no more
412  // be used by the application.
413 
414  extern void close_and_clean();
415 
416 
418  // WRAPPER FUNCTIONS AROUND archive class methods to trap exceptions and convert them in error code and message
419  // these are intended for C program/programmers not enough confident with C++.
420  //
421  // FOR LIBDAR C++ APPLICATIONS, YOU WOULD RATHER USE THE archive C++ CLASS THAN THESE FOLLOWING WRAPPERS
422  //
424 
425 
427 
432  const path & chem, const std::string & basename,
433  const std::string & extension,
434  const archive_options_read & options,
435  U_16 & exception,
436  std::string & except_msg);
437 
438 
440 
445  const path & fs_root,
446  const path & sauv_path,
447  const std::string & filename,
448  const std::string & extension,
449  const archive_options_create & options,
450  statistics * progressive_report,
451  U_16 & exception,
452  std::string & except_msg);
453 
454 
455 
457 
462  archive *ptr,
463  const path &sauv_path,
464  const std::string & filename,
465  const std::string & extension,
466  const archive_options_isolate & options,
467  U_16 & exception,
468  std::string & except_msg);
469 
471 
476  const path & sauv_path,
477  archive *ref_arch1,
478  const std::string & filename,
479  const std::string & extension,
480  const archive_options_merge & options,
481  statistics * progressive_report,
482  U_16 & exception,
483  std::string & except_msg);
484 
485 
487 
491  extern void close_archive_noexcept(archive *ptr,
492  U_16 & exception,
493  std::string & except_msg);
494 
495 
497 
502  archive *ptr,
503  const path &fs_root,
504  const archive_options_extract & options,
505  statistics * progressive_report,
506  U_16 & exception,
507  std::string & except_msg);
508 
509 
511 
515  extern void op_listing_noexcept(user_interaction & dialog,
516  archive *ptr,
517  const archive_options_listing & options,
518  U_16 & exception,
519  std::string & except_msg);
520 
521 
523 
528  archive *ptr,
529  const path & fs_root,
530  const archive_options_diff & options,
531  statistics * progressive_report,
532  U_16 & exception,
533  std::string & except_msg);
534 
535 
537 
542  archive *ptr,
543  const archive_options_test & options,
544  statistics * progressive_report,
545  U_16 & exception,
546  std::string & except_msg);
547 
548 
550 
554  extern bool get_children_of_noexcept(user_interaction & dialog,
555  archive *ptr,
556  const std::string & dir,
557  U_16 & exception,
558  std::string & except_msg);
559 
560 
561 
563  // TOOLS ROUTINES //
565 
566 
568 
578  extern char *libdar_str2charptr_noexcept(const std::string & x, U_16 & exception, std::string & except_msg);
579 
581  // THREAD CANCELLATION ROUTINES //
583 
584 #if MUTEX_WORKS
585 
592  extern void cancel_thread(pthread_t tid, bool immediate = true, U_64 flag = 0);
593 
595 
598  extern bool cancel_status(pthread_t tid);
599 
601 
605  extern bool cancel_clear(pthread_t tid);
606 #endif
607 
608 
610 
611 } // end of namespace
612 
613 #endif
char * libdar_str2charptr_noexcept(const std::string &x, U_16 &exception, std::string &except_msg)
routine provided to convert std::string to char *
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:52
here lies a mask that selects files present in a given listThe mask_list classes defined here is to b...
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 to signal an error in the argument given to libdar call of the API ...
Definition: erreurs.hpp:347
the generic class, parent of all masks
Definition: mask.hpp:61
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
return true if the entry is a sparse file (or hard linked sparse file)
Definition: criterium.hpp:277
makes the OR operator between two or more masks
Definition: mask.hpp:359
libdar5 namespace encapsulate all libdar symbols
Definition: archive5.hpp:36
std::string tools_getcwd()
get current working directory
are defined here basic integer types that tend to be portable
API v5 backward compatible class archive.
fsa_family
FSA family.
Definition: fsa_family.hpp:42
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
const U_I LIBDAR_COMPILE_TIME_MAJOR
libdar Major version defined at compilation time
Definition: libdar5.hpp:352
over_action_data
the possible actions for overwriting data
Definition: crit_action.hpp:47
defines the implementation for local filesystem entrepot The entrepot_local is the only implementatio...
makes an AND operator between two or more masks
Definition: mask.hpp:272
exception used to carry system error
Definition: erreurs.hpp:405
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
Definition: criterium.hpp:420
a set of general purpose routines
capa_status
the EFFECTIVE set the value of the associated capability for the calling thread
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
Definition: libdar5.hpp:329
decimal class, convert infinint from and to decimal represention
Definition: deci.hpp:50
exception used when hardware problem is found
Definition: erreurs.hpp:274
exception used when a requested fearture has not beed activated at compilation time ...
Definition: erreurs.hpp:365
class holding optional parameters used to test the structure coherence of an existing archive ...
std::string tools_printf(const char *format,...)
make printf-like formating to a std::string
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 ...
fsa_nature
FSA nature.
Definition: fsa_family.hpp:48
base classes used to store entree information in dar_manager databases
If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mti...
Definition: criterium.hpp:200
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 ...
const U_I LIBDAR_COMPILE_TIME_MEDIUM
libdar Medium version defined at compilation time
Definition: libdar5.hpp:354
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
const U_I LIBDAR_COMPILE_TIME_MINOR
libdar Minor version defined at compilation time
Definition: libdar5.hpp:356
returns true if the first entry is a plain file (whatever is the second)
Definition: criterium.hpp:120
matches regular expressions (see "man 7 regex")
Definition: mask.hpp:173
stores time information
Definition: datetime.hpp:58
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
Definition: criterium.hpp:401
nested namespace containing routines that give features activated at compile time ...
this is the parent class of all exception classes.
Definition: erreurs.hpp:51
realises the negation of the criterium given in argument to its constructor
Definition: criterium.hpp:457
exception used when a limitint overflow is detected, the maximum value of the limitint has been excee...
Definition: erreurs.hpp:201
the basic constant action
filesystem local files
the crypto algoritm definition
fsa_scope all_fsa_families()
provides a scope containing all FSA families
Definition: libdar5.hpp:299
class fichier_local definition. This is a full implementation/inherited class of class fichier_global...
gf_mode
generic_file openning modes
Definition: gf_mode.hpp:43
over_action_ea
the possible action for overwriting EA
Definition: crit_action.hpp:62
realises the AND operator
Definition: criterium.hpp:480
returns true if the data of the first entry is bigger or equal to the one of the second entry ...
Definition: criterium.hpp:223
negation of another mask
Definition: mask.hpp:226
boolean mask, either always true or false
Definition: mask.hpp:100
compression char2compression(char a)
convert a char as stored in archive to its compression value
Definition: libdar5.hpp:162
generic_file stored in memory
Definition: memory_file.hpp:40
exception used when an error concerning the treated data has been met
Definition: erreurs.hpp:311
string matches if it is subdir of mask or mask is a subdir of expression
Definition: mask.hpp:395
matches if string is exactly the given mask (no wilde card expression)
Definition: mask.hpp:426
returns true if the first entry is a inode with several hard links (whatever is the second entry) ...
Definition: criterium.hpp:138
exception used when secure memory has been exhausted
Definition: erreurs.hpp:143
return true if the entry is a dirty file (or hard linked dirty file)
Definition: criterium.hpp:261
the crit_chain class sequences crit_actions up to full definition of the action
crypto_algo
the different cypher available for encryption (strong or weak)
Definition: crypto.hpp:49
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
defines the interaction interface between libdar and users.
matches as done on shell command lines (see "man 7 glob")
Definition: mask.hpp:130
here is the definition of the path classthe path class handle path and provide several operation on t...
returns true if the EA of the first entry is more recent or equal to the one of the second entry ...
Definition: criterium.hpp:334
exception used when the thread libdar is running in is asked to stop
Definition: erreurs.hpp:382
exception used when memory has been exhausted
Definition: erreurs.hpp:126
exception used when a requested feature is not (yet) implemented
Definition: erreurs.hpp:256
compression char2compression(char a)
convert a char as stored in archive to its compression value
Definition: libdar5.hpp:162
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.
exception used when arithmetic error is detected when operating on infinint
Definition: erreurs.hpp:183
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value ...
Definition: libdar5.hpp:165
class handling access to the data summary of treated files after and during each operation ...
to be able to cancel libdar operation while running in a given thread.
this file holds the database class definition as defined in API version 5
char compression2char(compression c)
convert a compression value to a char for storing in archive
std::string compression2string(compression c)
convert a compression to its string representation
defines the implementation of pipe under the generic_file interface.mainly used between zapette and s...
matches if string is the given constructor string or a sub directory of it
Definition: mask.hpp:457
the global action for overwriting
Definition: crit_action.hpp:81
class holding optional parameters used to extract files from an existing archive
exception used to signal convertion problem between infinint and string (decimal representation) ...
Definition: erreurs.hpp:238
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
Definition: criterium.hpp:440
U_I tools_octal2int(const std::string &perm)
convert octal string to integer
API v5 backward compatible user_interaction_callback class.
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value ...
Definition: libdar5.hpp:165
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) ...
class to be used as parent to provide checkpoints to inherited classes
bool tools_my_atoi(const char *a, U_I &val)
ascii to integer conversion
std::set< fsa_family > fsa_scope
set of fsa families
Definition: fsa_family.hpp:70
return true if the entry has delta signatur
Definition: criterium.hpp:294
defines the implementation for remote filesystem entrepot using libcurl
switch module to limitint (32 ou 64 bits integers) or infinint
here lies a collection of mask classes
manages the decimal representation of infinint
exception used to signal range error
Definition: erreurs.hpp:219
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:43
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
Definition: erreurs.hpp:162
class secu_string
Definition: secu_string.hpp:57
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
Definition: libdar5.hpp:329
compression
the different compression algorithm available
Definition: compression.hpp:45
this is the interface class from which all other data transfer classes inherit
the generic criterium class, parent of all criterium
Definition: criterium.hpp:51
nested namespace inside libdar
compression engine implementation
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
class archive_num stores the position of an archive inside a dar_manager database ...
Definition: archive_num.hpp:46
exception used to signal that the user has aborted the operation
Definition: erreurs.hpp:292
returns true if the first entry is an inode (whatever is the second)
Definition: criterium.hpp:86
returns true if the data of the first entry is more recent or of the same date of the one of the seco...
Definition: criterium.hpp:176
hash_algo
hashing algorithm available
Definition: archive_aux.hpp:62
the archive class realizes the most general operations on archives
Definition: archive5.hpp:54
the testing class binds criterium to actions
if the entry is not an inode the result is also true
Definition: criterium.hpp:244
the arbitrary large positive integer class
exception used when error the inter-slice user command returned an error code
Definition: erreurs.hpp:329
provide information about current thread (underlying using the widthdrawn POSIX.1e API) ...
mycurl_protocol
libcurl protocols supported by libdar
pipe implementation under the generic_file interface.
Definition: tuyau.hpp:48
fsa_scope all_fsa_families()
provides a scope containing all FSA families
Definition: libdar5.hpp:299
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)
returns true if the first entry has more or even EA (in number not in size) than the second entry ...
Definition: criterium.hpp:381
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
This is a pure virtual class that is used by libdar when interaction with the user is required...
returns true if the first entry is a cat_directory (whatever is the second)
Definition: criterium.hpp:103
signator status
Definition: crypto.hpp:62
void close_archive_noexcept(archive *ptr, U_16 &exception, std::string &except_msg)
this is wrapper around the archive destructor
the mask_list class, matches string that are present in a given file
Definition: mask_list.hpp:50
Definition: list_entry.hpp:59
set of datastructures used to interact with a catalogue object
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument...
Definition: criterium.hpp:358
class used by libdar::archive class to give a summary of treated file during and after an operation ...
Definition: statistics.hpp:69
the class path is here to manipulate paths in the Unix notation: using&#39;/&#39;
Definition: path.hpp:49