Disk ARchive  2.4.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
libdar_4_4.hpp
Go to the documentation of this file.
1 //*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 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 
31 
32 
33 #ifndef LIBDAR_4_4_HPP
34 #define LIBDAR_4_4_HPP
35 
36 #include "../my_config.h"
37 
38 extern "C"
39 {
40 #if MUTEX_WORKS
41 #if HAVE_PTHREAD_H
42 #include <pthread.h>
43 #endif
44 #endif
45 }
46 
47 #include <string>
48 
49 
50 #include "erreurs.hpp"
51 
53 namespace libdar_4_4
54 {
55 
58 
59  typedef libdar::Egeneric Egeneric;
60  typedef libdar::Ememory Ememory;
61  typedef libdar::Ebug Ebug;
64  typedef libdar::Erange Erange;
65  typedef libdar::Edeci Edeci;
66  typedef libdar::Efeature Efeature;
69  typedef libdar::Edata Edata;
70  typedef libdar::Escript Escript;
71  typedef libdar::Elibcall Elibcall;
74 }
75 
76 #include "compressor.hpp"
77 namespace libdar_4_4
78 {
79  typedef libdar::compression compression;
80 
81  const compression none = libdar::none;
82  const compression zip = libdar::gzip;
83  const compression gzip = libdar::gzip;
84  const compression bzip2 = libdar::bzip2;
85 
86  inline compression char2compression(char a) { return libdar::char2compression(a); }
87  inline char compression2char(compression c) { return libdar::compression2char(c); }
88  inline std::string compression2string(compression c) { return libdar::compression2string(c); }
89  inline compression string2compression(const std::string & a) { return libdar::string2compression(a); }
90 
91  typedef libdar::compressor compressor;
92 }
93 
94 #include "path.hpp"
95 namespace libdar_4_4
96 {
97  typedef libdar::path path;
98 }
99 
100 #include "mask.hpp"
101 namespace libdar_4_4
102 {
103  typedef libdar::mask mask;
104  typedef libdar::bool_mask bool_mask;
105  typedef libdar::simple_mask simple_mask;
106  typedef libdar::bool_mask bool_mask;
107  typedef libdar::regular_mask regular_mask;
108  typedef libdar::not_mask not_mask;
109  typedef libdar::et_mask et_mask;
110  typedef libdar::ou_mask ou_mask;
111  typedef libdar::simple_path_mask simple_path_mask;
112  typedef libdar::same_path_mask same_path_mask;
113  typedef libdar::exclude_dir_mask exclude_dir_mask;
114 }
115 
116 #include "integers.hpp" // OK
117 namespace libdar_4_4
118 {
119  typedef libdar::U_8 U_8;
120  typedef libdar::U_16 U_16;
121  typedef libdar::U_32 U_32;
122  typedef libdar::U_64 U_64;
123  typedef libdar::U_I U_I;
124  typedef libdar::S_8 S_8;
125  typedef libdar::S_16 S_16;
126  typedef libdar::S_32 S_32;
127  typedef libdar::S_64 S_64;
128  typedef libdar::S_I S_I;
129 }
130 
131 
132 #include "infinint.hpp"
133 namespace libdar_4_4
134 {
135  typedef libdar::infinint infinint;
136 }
137 
138 #include "statistics.hpp"
139 namespace libdar_4_4
140 {
141  typedef libdar::statistics statistics;
142 }
143 
144 #include "user_interaction.hpp" // OK
145 namespace libdar_4_4
146 {
148 
150  {
151  public:
152 
153  virtual void dar_manager_show_version(U_I number,
154  const std::string & data_date,
155  const std::string & ea_date);
156  protected:
157  libdar::secu_string get_secu_string(const std::string & message, bool echo)
158  {
159  // this is a backward compatibile API, yes, we loose the secured storage feature for keys
160  std::string tmp = get_string(message, echo);
161  libdar::secu_string ret = libdar::secu_string(tmp.c_str(), tmp.size());
162 
163  return ret;
164  };
165  private:
166  void dar_manager_show_version(U_I number,
167  const std::string & data_date,
168  const std::string & data_presence,
169  const std::string & ea_date,
170  const std::string & ea_presence)
171  {
172  dar_manager_show_version(number, data_date, ea_date);
173  }
174  };
175 
176  typedef libdar::user_interaction_callback user_interaction_callback;
177 }
178 
179 #include "deci.hpp"
180 namespace libdar_4_4
181 {
182  typedef libdar::deci deci;
183 }
184 
185 #include "archive_version.hpp"
186 namespace libdar_4_4
187 {
188  typedef libdar::archive_version dar_version;
189 }
190 
191 #include "crypto.hpp"
192 namespace libdar_4_4
193 {
195 
196  const crypto_algo crypto_none = libdar::crypto_none;
197  const crypto_algo crypto_scrambling = libdar::crypto_scrambling;
198  const crypto_algo crypto_blowfish = libdar::crypto_blowfish;
199  const crypto_algo crypto_blowfish_weak = libdar::crypto_blowfish;
200 
201  libdar::secu_string string2secu_string(const std::string & st);
202 
203  inline void crypto_split_algo_pass(const std::string & all, crypto_algo & algo, std::string & pass)
204  {
205  libdar::secu_string sall = string2secu_string(all);
206  libdar::secu_string spass;
207  libdar::crypto_split_algo_pass(sall, algo, spass);
208  pass = spass.c_str();
209  }
210 
212 
214  {
215  blowfish(user_interaction & dialog,
216  U_32 block_size,
217  const std::string & password,
218  generic_file & encrypted_side,
219  const dar_version & reading_ver,
220  bool weak_mode)
221  : libdar::crypto_sym(block_size, string2secu_string(password), encrypted_side, false, reading_ver, libdar::crypto_blowfish) {};
222  };
223 }
224 
225 #include "catalogue.hpp"
226 namespace libdar_4_4
227 {
228  typedef libdar::inode inode;
229 }
230 
231 #include "archive.hpp"
232 namespace libdar_4_4
233 {
234 
235 
237 
238  class archive : public libdar::archive
239  {
240  public:
242 
252  static archive *piggy_convert(libdar::archive * ref);
253 
256  static const listformat normal = libdar::archive_options_listing::normal;
257  static const listformat tree = libdar::archive_options_listing::tree;
258  static const listformat xml = libdar::archive_options_listing::xml;
259 
260  archive(user_interaction & dialog,
261  const path & chem,
262  const std::string & basename,
263  const std::string & extension,
264  crypto_algo crypto,
265  const std::string &pass,
266  U_32 crypto_size,
267  const std::string & input_pipe,
268  const std::string & output_pipe,
269  const std::string & execute,
270  bool info_details); // read constructor
271 
272  archive(user_interaction & dialog,
273  const path & fs_root,
274  const path & sauv_path,
275  archive *ref_arch,
276  const mask & selection,
277  const mask & subtree,
278  const std::string & filename,
279  const std::string & extension,
280  bool allow_over,
281  bool warn_over,
282  bool info_details,
283  const infinint & pause,
284  bool empty_dir,
285  compression algo,
286  U_I compression_level,
287  const infinint &file_size,
288  const infinint &first_file_size,
289  const mask & ea_mask,
290  const std::string & execute,
291  crypto_algo crypto,
292  const std::string & pass,
293  U_32 crypto_size,
294  const mask & compr_mask,
295  const infinint & min_compr_size,
296  bool nodump,
297  inode::comparison_fields what_to_check,
298  const infinint & hourshift,
299  bool empty,
300  bool alter_atime,
301  bool same_fs,
302  bool snapshot,
303  bool cache_directory_tagging,
304  bool display_skipped,
305  const infinint & fixed_date,
306  statistics * progressive_report); // create constructor
307 
308  archive(user_interaction & dialog,
309  const path &sauv_path,
310  archive *ref_arch,
311  const std::string & filename,
312  const std::string & extension,
313  bool allow_over,
314  bool warn_over,
315  bool info_details,
316  const infinint & pause,
317  compression algo,
318  U_I compression_level,
319  const infinint &file_size,
320  const infinint &first_file_size,
321  const std::string & execute,
322  crypto_algo crypto,
323  const std::string & pass,
324  U_32 crypto_size,
325  bool empty); // isolate constructor
326 
327 
328  archive(user_interaction & dialog,
329  const path & sauv_path,
330  archive *ref_arch1,
331  archive *ref_arch2,
332  const mask & selection,
333  const mask & subtree,
334  const std::string & filename,
335  const std::string & extension,
336  bool allow_over,
337  bool warn_over,
338  bool info_details,
339  const infinint & pause,
340  bool empty_dir,
341  compression algo,
342  U_I compression_level,
343  const infinint & file_size,
344  const infinint & first_file_size,
345  const mask & ea_mask,
346  const std::string & execute,
347  crypto_algo crypto,
348  const std::string & pass,
349  U_32 crypto_size,
350  const mask & compr_mask,
351  const infinint & min_compr_size,
352  bool empty,
353  bool display_skipped,
354  bool keep_compressed,
355  statistics * progressive_report); // merging constructor
356 
357  statistics op_extract(user_interaction & dialog,
358  const path &fs_root,
359  const mask &selection,
360  const mask &subtree,
361  bool allow_over,
362  bool warn_over,
363  bool info_details,
364  bool detruire,
365  bool only_more_recent,
366  const mask & ea_mask,
367  bool flat,
368  inode::comparison_fields what_to_check,
369  bool warn_remove_no_match,
370  const infinint & hourshift,
371  bool empty,
372  bool ea_erase,
373  bool display_skipped,
374  statistics *progressive_report);
375 
376  void op_listing(user_interaction & dialog,
377  bool info_details,
378  archive::listformat list_mode,
379  const mask &selection,
380  bool filter_unsaved);
381 
382  statistics op_diff(user_interaction & dialog,
383  const path & fs_root,
384  const mask &selection,
385  const mask &subtree,
386  bool info_details,
387  const mask & ea_mask,
388  inode::comparison_fields what_to_check,
389  bool alter_atime,
390  bool display_skipped,
391  statistics * progressive_report,
392  const infinint & hourshift = 0);
393 
394  statistics op_test(user_interaction & dialog,
395  const mask &selection,
396  const mask &subtree,
397  bool info_details,
398  bool display_skipped,
399  statistics * progressive_report);
400  };
401 }
402 
403 
404 #include "thread_cancellation.hpp"
405 namespace libdar_4_4
406 {
407  typedef libdar::thread_cancellation thread_cancellation;
408 }
409 
411 #define LIBDAR_XXXXXXXX
412 
414 #define LIBDAR_NOEXCEPT 0
415 #define LIBDAR_EMEMORY 1
417 
418 
420 #define LIBDAR_EBUG 2
421 #define LIBDAR_EINFININT 3
423 #define LIBDAR_ELIMITINT 4
425 #define LIBDAR_ERANGE 5
427 #define LIBDAR_EDECI 6
429 #define LIBDAR_EFEATURE 7
431 #define LIBDAR_EHARDWARE 8
433 #define LIBDAR_EUSER_ABORT 9
435 #define LIBDAR_EDATA 10
437 #define LIBDAR_ESCRIPT 11
439 #define LIBDAR_ELIBCALL 12
441 #define LIBDAR_UNKNOWN 13
443 #define LIBDAR_ECOMPILATION 14
445 #define LIBDAR_THREAD_CANCEL 15
447 
448 namespace libdar_4_4
449 {
450 
454  // the last libdar version of releases 2.3.x is 4.5.0, so we skip by one the medium to make the difference,
455  // but we keep the major to 4 (to avoid alarming external programs expecting the libdar API version 4)
459 
461  // LIBDAR INITIALIZATION METHODS //
462  // //
463  // A FUNCTION OF THE get_version*() FAMILY *MUST* BE CALLED //
464  // BEFORE ANY OTHER FUNCTION OF THIS LIBRARY //
465  // //
466  // CLIENT PROGRAM MUST CHECK THAT THE MAJOR NUMBER RETURNED //
467  // BY THIS CALL IS NOT GREATER THAN THE VERSION USED AT COMPILATION //
468  // TIME. IF SO, THE PROGRAM MUST ABORT AND RETURN A WARNING TO THE //
469  // USER TELLING THE DYNAMICALLY LINKED VERSION IS TOO RECENT AND NOT //
470  // COMPATIBLE WITH THIS SOFTWARE. THE MESSAGE MUST INVITE THE USER //
471  // TO UPGRADE HIS SOFTWARE WITH A MORE RECENT VERSION COMPATIBLE WITH //
472  // THIS LIBDAR RELEASE. //
474 
476  void get_version(U_I & major, U_I & minor, bool init_libgcrypt = true);
477 
479  void get_version_noexcept(U_I & major, U_I & minor, U_16 & exception, std::string & except_msg, bool init_libgcrypt = true);
480 
482 
491  void get_version(U_I & major, U_I & medium, U_I & minor, bool init_libgcrypt = true);
492 
494 
506  void get_version_noexcept(U_I & major, U_I & medium, U_I & minor, U_16 & exception, std::string & except_msg, bool init_libgcrypt = true);
507 
508 
510 
523  void get_compile_time_features(bool & ea, bool & largefile, bool & nodump, bool & special_alloc, U_I & bits,
524  bool & thread_safe,
525  bool & libz, bool & libbz2, bool & libcrypto,
526  bool & new_blowfish);
527 
529  // WRAPPER FUNCTIONS AROUND archive class methods to trap exceptions and convert them in error code and message
530  // these are intended for C program/programmers not enough confident with C++.
531  //
532  // FOR LIBDAR C++ APPLICATIONS, YOU WOULD RATHER USE THE archive C++ CLASS THAN THESE FOLLOWING WRAPPERS
533  //
535 
536 
538 
543  const path & chem, const std::string & basename,
544  const std::string & extension,
545  crypto_algo crypto, const std::string &pass, U_32 crypto_size,
546  const std::string & input_pipe, const std::string & output_pipe,
547  const std::string & execute, bool info_details,
548  U_16 & exception,
549  std::string & except_msg);
550 
552 
557  const path & fs_root,
558  const path & sauv_path,
559  archive *ref_arch,
560  const mask & selection,
561  const mask & subtree,
562  const std::string & filename,
563  const std::string & extension,
564  bool allow_over,
565  bool warn_over,
566  bool info_details,
567  const infinint & pause,
568  bool empty_dir,
569  compression algo,
570  U_I compression_level,
571  const infinint &file_size,
572  const infinint &first_file_size,
573  const mask & ea_mask,
574  const std::string & execute,
575  crypto_algo crypto,
576  const std::string & pass,
577  U_32 crypto_size,
578  const mask & compr_mask,
579  const infinint & min_compr_size,
580  bool nodump,
581  inode::comparison_fields what_to_check,
582  const infinint & hourshift,
583  bool empty,
584  bool alter_atime,
585  bool same_fs,
586  bool snapshot,
587  bool cache_directory_tagging,
588  bool display_skipped,
589  const infinint & fixed_date,
590  statistics * progressive_report,
591  U_16 & exception,
592  std::string & except_msg);
593 
594 
596 
601  const path &sauv_path,
602  archive *ref_arch,
603  const std::string & filename,
604  const std::string & extension,
605  bool allow_over,
606  bool warn_over,
607  bool info_details,
608  const infinint & pause,
609  compression algo,
610  U_I compression_level,
611  const infinint &file_size,
612  const infinint &first_file_size,
613  const std::string & execute,
614  crypto_algo crypto,
615  const std::string & pass,
616  U_32 crypto_size,
617  bool empty,
618  U_16 & exception,
619  std::string & except_msg);
620 
622 
627  const path & sauv_path,
628  archive *ref_arch1,
629  archive *ref_arch2,
630  const mask & selection,
631  const mask & subtree,
632  const std::string & filename,
633  const std::string & extension,
634  bool allow_over,
635  bool warn_over,
636  bool info_details,
637  const infinint & pause,
638  bool empty_dir,
639  compression algo,
640  U_I compression_level,
641  const infinint & file_size,
642  const infinint & first_file_size,
643  const mask & ea_mask,
644  const std::string & execute,
645  crypto_algo crypto,
646  const std::string & pass,
647  U_32 crypto_size,
648  const mask & compr_mask,
649  const infinint & min_compr_size,
650  bool empty,
651  bool display_skipped,
652  bool keep_compressed,
653  statistics * progressive_report,
654  U_16 & exception,
655  std::string & except_msg);
656 
657 
659 
663  extern void close_archive_noexcept(archive *ptr,
664  U_16 & exception,
665  std::string & except_msg);
666 
667 
669 
674  archive *ptr,
675  const path &fs_root,
676  const mask &selection,
677  const mask &subtree,
678  bool allow_over,
679  bool warn_over,
680  bool info_details,
681  bool detruire,
682  bool only_more_recent,
683  const mask & ea_mask,
684  bool flat,
685  inode::comparison_fields what_to_check,
686  bool warn_remove_no_match,
687  const infinint & hourshift,
688  bool empty,
689  bool ea_erase,
690  bool display_skipped,
691  statistics * progressive_report,
692  U_16 & exception,
693  std::string & except_msg);
694 
695 
697 
701  extern void op_listing_noexcept(user_interaction & dialog,
702  archive *ptr,
703  bool info_details,
704  archive::listformat list_mode,
705  const mask &selection,
706  bool filter_unsaved,
707  U_16 & exception,
708  std::string & except_msg);
709 
710 
712 
717  archive *ptr,
718  const path & fs_root,
719  const mask &selection,
720  const mask &subtree,
721  bool info_details,
722  const mask & ea_mask,
723  inode::comparison_fields what_to_check,
724  bool alter_atime,
725  bool display_skipped,
726  statistics * progressive_report,
727  U_16 & exception,
728  std::string & except_msg);
729 
730 
732 
737  archive *ptr,
738  const mask &selection,
739  const mask &subtree,
740  bool info_details,
741  bool display_skipped,
742  statistics * progressive_report,
743  U_16 & exception,
744  std::string & except_msg);
745 
746 
748 
752  extern bool get_children_of_noexcept(user_interaction & dialog,
753  archive *ptr,
754  const std::string & dir,
755  U_16 & exception,
756  std::string & except_msg);
757 
758 
759 
761  // TOOLS ROUTINES //
763 
764 
766 
776  extern char *libdar_str2charptr_noexcept(const std::string & x, U_16 & exception, std::string & except_msg);
777 }
778 
779 #include "criterium.hpp"
780 
781 namespace libdar_4_4
782 {
783 
785 
792  extern void tools_4_4_build_compatible_overwriting_policy(bool allow_over,
793  bool detruire,
794  bool more_recent,
795  const libdar::infinint & hourshift,
796  bool ea_erase,
797  const libdar::crit_action * & overwrite);
798 
799 
801  // THREAD CANCELLATION ROUTINES //
803 
804 #if MUTEX_WORKS
805 
812  inline void cancel_thread(pthread_t tid, bool immediate = true, U_64 flag = 0) { thread_cancellation::cancel(tid, immediate, flag); }
813 
815 
818  inline bool cancel_status(pthread_t tid) { return thread_cancellation::cancel_status(tid); }
819 
821 
825  inline bool cancel_clear(pthread_t tid) { return thread_cancellation::clear_pending_request(tid); }
826 #endif
827 
828 
830 
831 } // end of namespace
832 
833 
834 #endif
contains classes that let the user define the policy for overwriting files
wrapper class for user_interaction
Definition: libdar_4_4.hpp:149
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
exception used to signal an error in the argument given to libdar call of the API ...
Definition: erreurs.hpp:266
the generic class, parent of all masks
Definition: mask.hpp:61
makes the OR operator between two or more masks
Definition: mask.hpp:290
const U_I LIBDAR_COMPILE_TIME_MEDIUM
libdar Medium version defined at compilation time
Definition: libdar_4_4.hpp:456
are defined here basic integer types that tend to be portable
the archive class is defined in this module
statistics op_diff_noexcept(user_interaction &dialog, archive *ptr, const path &fs_root, const mask &selection, const mask &subtree, bool info_details, const mask &ea_mask, inode::comparison_fields what_to_check, bool alter_atime, bool display_skipped, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_diff method
void get_version_noexcept(U_I &major, U_I &minor, U_16 &exception, std::string &except_msg, bool init_libgcrypt=true)
depreacted old get_version function
makes an AND operator between two or more masks
Definition: mask.hpp:216
bool largefile()
returns whether largefile (>2GiB) support has been activated at compilation time
archive * merge_archive_noexcept(user_interaction &dialog, const path &sauv_path, archive *ref_arch1, archive *ref_arch2, const mask &selection, const mask &subtree, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, const infinint &pause, bool empty_dir, compression algo, U_I compression_level, const infinint &file_size, const infinint &first_file_size, const mask &ea_mask, const std::string &execute, crypto_algo crypto, const std::string &pass, U_32 crypto_size, const mask &compr_mask, const infinint &min_compr_size, bool empty, bool display_skipped, bool keep_compressed, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "merging" constructor ...
decimal class, convert infinint from and to decimal represention
Definition: deci.hpp:49
exception used when hardware problem is found
Definition: erreurs.hpp:213
exception used when a requested fearture has not beed activated at compilation time ...
Definition: erreurs.hpp:279
void crypto_split_algo_pass(const secu_string &all, crypto_algo &algo, secu_string &pass)
void get_version(U_I &major, U_I &minor, bool init_libgcrypt=true)
depreacted old get_version function
bool ea()
returns whether EA support has been activated at compilation time
matches regular expressions (see "man 7 regex")
Definition: mask.hpp:144
This is a pure virtual class that is used by libdar when interaction with the user is required...
this is the parent class of all exception classes.
Definition: erreurs.hpp:51
exception used when a limitint overflow is detected, the maximum value of the limitint has been excee...
Definition: erreurs.hpp:160
void tools_4_4_build_compatible_overwriting_policy(bool allow_over, bool detruire, bool more_recent, const libdar::infinint &hourshift, bool ea_erase, const libdar::crit_action *&overwrite)
Defines an overwriting policy based on pre 2.4.0 options.
bzip2 compression
Definition: compressor.hpp:47
static archive * piggy_convert(libdar::archive *ref)
convertion from libdar::archive * to libdar_4_4::archive *
the crypto algoritm definition
negation of another mask
Definition: mask.hpp:182
gzip compression
Definition: compressor.hpp:46
boolean mask, either always true or false
Definition: mask.hpp:90
exception used when an error concerning the treated data has been met
Definition: erreurs.hpp:240
string matches if it is subdir of mask or mask is a subdir of expression
Definition: mask.hpp:319
matches if string is exactly the given mask (no wilde card expression)
Definition: mask.hpp:344
archive * open_archive_noexcept(user_interaction &dialog, const path &chem, const std::string &basename, const std::string &extension, crypto_algo crypto, const std::string &pass, U_32 crypto_size, const std::string &input_pipe, const std::string &output_pipe, const std::string &execute, bool info_details, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "read" constructor
bool libz()
returns whether libdar is dependent on libz and if so has gzip compression/decompression available ...
virtual std::string get_string(const std::string &message, bool echo)=0
method used to ask a question that needs an arbitrary answer.
the archive class realizes the most general operations on archives
Definition: archive.hpp:52
no compression
Definition: compressor.hpp:45
crypto_algo
the different cypher available for encryption (strong or weak)
Definition: crypto.hpp:53
full implemented class for user_interaction based on callback functions.
defines the interaction between libdar and the user.Three classes are defined
matches as done on shell command lines (see "man 7 glob")
Definition: mask.hpp:114
here is the definition of the path classthe path class handle path and provide several operation on t...
statistics op_extract_noexcept(user_interaction &dialog, archive *ptr, const path &fs_root, const mask &selection, const mask &subtree, bool allow_over, bool warn_over, bool info_details, bool detruire, bool only_more_recent, const mask &ea_mask, bool flat, inode::comparison_fields what_to_check, bool warn_remove_no_match, const infinint &hourshift, bool empty, bool ea_erase, bool display_skipped, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_extract method
the root class for all inode
Definition: catalogue.hpp:203
exception used when the thread libdar is running in is asked to stop
Definition: erreurs.hpp:291
exception used when memory has been exhausted
Definition: erreurs.hpp:105
exception used when a requested feature is not (yet) implemented
Definition: erreurs.hpp:200
const U_I LIBDAR_COMPILE_TIME_MINOR
libdar Minor version defined at compilation time
Definition: libdar_4_4.hpp:458
implementation of encryption using symetrical cryptography used in libgcrypt (among which is blowfish...
Definition: crypto.hpp:83
archive * isolate_archive_noexcept(user_interaction &dialog, const path &sauv_path, archive *ref_arch, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, const infinint &pause, compression algo, U_I compression_level, const infinint &file_size, const infinint &first_file_size, const std::string &execute, crypto_algo crypto, const std::string &pass, U_32 crypto_size, bool empty, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "isolate" constructor ...
exception used when arithmetic error is detected when operating on infinint
Definition: erreurs.hpp:147
handle the statistic structure that gives a summary of treated files after each operatio ...
to be able to cancel libdar operation while running in a given thread.the class thread_cancellation i...
const U_I LIBDAR_COMPILE_TIME_MAJOR
libdar Major version defined at compilation time
Definition: libdar_4_4.hpp:452
wrapper class for blowfish
Definition: libdar_4_4.hpp:213
libdar::secu_string get_secu_string(const std::string &message, bool echo)
same a get_string() but uses secu_string instead
Definition: libdar_4_4.hpp:157
matches if string is the given constructor string or a sub directory of it
Definition: mask.hpp:367
the global action for overwriting
Definition: criterium.hpp:76
exception used to signal convertion problem between infinint and string (decimal representation) ...
Definition: erreurs.hpp:187
char * libdar_str2charptr_noexcept(const std::string &x, U_16 &exception, std::string &except_msg)
routine provided to convert std::string to char *
generic_file(gf_mode m)
main constructor
archive * create_archive_noexcept(user_interaction &dialog, const path &fs_root, const path &sauv_path, archive *ref_arch, const mask &selection, const mask &subtree, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, const infinint &pause, bool empty_dir, compression algo, U_I compression_level, const infinint &file_size, const infinint &first_file_size, const mask &ea_mask, const std::string &execute, crypto_algo crypto, const std::string &pass, U_32 crypto_size, const mask &compr_mask, const infinint &min_compr_size, bool nodump, inode::comparison_fields what_to_check, const infinint &hourshift, bool empty, bool alter_atime, bool same_fs, bool snapshot, bool cache_directory_tagging, bool display_skipped, const infinint &fixed_date, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "create" constructor ...
class to be used as parent to provide checkpoints to inherited classes
libdar::archive_options_listing::listformat listformat
defines the way archive listing is done:
Definition: libdar_4_4.hpp:255
void get_compile_time_features(bool &ea, bool &largefile, bool &nodump, bool &special_alloc, U_I &bits, bool &thread_safe, bool &libz, bool &libbz2, bool &libcrypto, bool &new_blowfish)
return the options activated that have been activated at compilation time
contains all the excetion class thrown by libdar
listformat
defines the way archive listing is done:
switch module to limitint (32 ou 64 bits integers) or infinint
here lies a collection of mask classes
compression class for gzip and bzip2 algorithms
Definition: compressor.hpp:60
manages the decimal representation of infinint
bool thread_safe()
returns whether the current libdar is thread safe
exception used to signal range error
Definition: erreurs.hpp:173
U_I bits()
returns the internal integer type used
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
Definition: erreurs.hpp:131
class secu_string
Definition: secu_string.hpp:57
compression
the different compression algorithm available
Definition: compressor.hpp:43
void op_listing_noexcept(user_interaction &dialog, archive *ptr, bool info_details, archive::listformat list_mode, const mask &selection, bool filter_unsaved, U_16 &exception, std::string &except_msg)
this is wrapper around the op_listing method
bool nodump()
returns whether nodump flag support has been activated at compilation time
no encryption
Definition: crypto.hpp:55
compression engine implementation
blowfish strong encryption
Definition: crypto.hpp:57
class archive_version that rules which archive format to follow
exception used to signal that the user has aborted the operation
Definition: erreurs.hpp:226
compression char2compression(char a)
Definition: libdar_4_4.hpp:86
libdar_4_4 namespace encapsulate all symbols of the backward compatible API
Definition: libdar_4_4.hpp:53
the arbitrary large positive integer class
exception used when error the inter-slice user command returned an error code
Definition: erreurs.hpp:253
class archive_version manages the version of the archive format
comparison_fields
flag used to only consider certain fields when comparing/restoring inodes
Definition: catalogue.hpp:209
scrambling weak encryption
Definition: crypto.hpp:56
bool libbz2()
returns whether libdar is dependent on libbz2 and if so has bzip2 compression/decompression available...
const char * c_str() const
get access to the secure string
void close_archive_noexcept(archive *ptr, U_16 &exception, std::string &except_msg)
this is wrapper around the archive destructor
wrapper class for archive
Definition: libdar_4_4.hpp:238
here is defined the many classed which is build of the catalogue
structure returned by libdar call to give a summary of the operation done in term of file treated ...
Definition: statistics.hpp:68
statistics op_test_noexcept(user_interaction &dialog, archive *ptr, const mask &selection, const mask &subtree, bool info_details, bool display_skipped, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_test method
the class path is here to manipulate paths in the Unix notation: using'/'
Definition: path.hpp:50