Disk ARchive  2.6.2
Full featured and portable backup and archiving tool
archive_options.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2019 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 #ifndef ARCHIVE_OPTIONS_HPP
27 #define ARCHIVE_OPTIONS_HPP
28 
29 #include "../my_config.h"
30 #include "crypto.hpp"
31 #include "integers.hpp"
32 #include "mask.hpp"
33 #include "mask_list.hpp"
34 #include "crit_action.hpp"
35 #include "secu_string.hpp"
36 #include "entrepot.hpp"
37 #include "fsa_family.hpp"
39 #include "archive_aux.hpp"
40 #include "compression.hpp"
41 
42 #include <string>
43 #include <vector>
44 #include <set>
45 #include <memory>
46 
47 namespace libdar
48 {
49  class archive; // needed to be able to use pointer on archive object.
50 
51 
55 
58 
59 
61 
63  {
64  public:
67 
69  archive_options_read(const archive_options_read & ref) : x_ref_chem(ref.x_ref_chem) { copy_from(ref); };
71  archive_options_read & operator = (const archive_options_read & ref) { copy_from(ref); return *this; };
72  archive_options_read & operator = (archive_options_read && ref) noexcept { move_from(std::move(ref)); return *this; };
73  ~archive_options_read() = default;
74 
75 
77  // set back to default (this is the state just after the object is constructed
78  // this method is to be used to reuse a given object
79 
81  void clear();
82 
83 
85  // setting methods
86 
87 
89 
95  void set_crypto_algo(crypto_algo val) { x_crypto = val; };
96 
98  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
99 
101  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
102 
105 
107 
110  void set_input_pipe(const std::string & input_pipe) { x_input_pipe = input_pipe; };
111 
113 
116  void set_output_pipe(const std::string & output_pipe) { x_output_pipe = output_pipe; };
117 
119 
129  void set_execute(const std::string & execute) { x_execute = execute; };
130 
132  void set_info_details(bool info_details) { x_info_details = info_details; };
133 
135 
139  void set_lax(bool val) { x_lax = val; };
140 
142 
144 
145  void set_sequential_read(bool val) { x_sequential_read = val; };
146 
148 
149  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
150 
151 
153  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_read::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
154 
156  void set_ignore_signature_check_failure(bool val) { x_ignore_signature_check_failure = val; };
157 
159  void set_multi_threaded(bool val) { x_multi_threaded = val; };
160 
161 
163 
165  void set_external_catalogue(const path & ref_chem, const std::string & ref_basename) { x_ref_chem = ref_chem, x_ref_basename = ref_basename; external_cat = true; };
168 
170  void set_ref_crypto_algo(crypto_algo ref_crypto) { x_ref_crypto = ref_crypto; };
171 
173  void set_ref_crypto_pass(const secu_string & ref_pass) { x_ref_pass = ref_pass; };
174 
176  void set_ref_crypto_size(U_32 ref_crypto_size) { x_ref_crypto_size = ref_crypto_size; };
177 
179 
189  void set_ref_execute(const std::string & ref_execute) { x_ref_execute = ref_execute; };
190 
191 
193 
194  void set_ref_slice_min_digits(infinint val) { x_ref_slice_min_digits = val; };
195 
197  void set_ref_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_read::set_ref_entrepot", "null entrepot pointer given in argument"); x_ref_entrepot = entr; };
198 
200  void set_header_only(bool val) { x_header_only = val; };
201 
202 
203 
205  // getting methods (mainly used inside libdar, but kept public and part of the API in the case it is needed)
206 
207 
208  crypto_algo get_crypto_algo() const { return x_crypto; };
209  const secu_string & get_crypto_pass() const { return x_pass; };
210  U_32 get_crypto_size() const { return x_crypto_size; };
211  const std::string & get_input_pipe() const { return x_input_pipe; };
212  const std::string & get_output_pipe() const { return x_output_pipe; };
213  const std::string & get_execute() const { return x_execute; };
214  bool get_info_details() const { return x_info_details; };
215  bool get_lax() const { return x_lax; };
216  bool get_sequential_read() const { return x_sequential_read; };
217  infinint get_slice_min_digits() const { return x_slice_min_digits; };
218  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
219  bool get_ignore_signature_check_failure() const { return x_ignore_signature_check_failure; };
220  bool get_multi_threaded() const { return x_multi_threaded; };
221 
222  // All methods that follow concern the archive where to fetch the (isolated) catalogue from
223  bool is_external_catalogue_set() const { return external_cat; };
224  const path & get_ref_path() const;
225  const std::string & get_ref_basename() const;
226  crypto_algo get_ref_crypto_algo() const { return x_ref_crypto; };
227  const secu_string & get_ref_crypto_pass() const { return x_ref_pass; };
228  U_32 get_ref_crypto_size() const { return x_ref_crypto_size; };
229  const std::string & get_ref_execute() const { return x_ref_execute; };
230  infinint get_ref_slice_min_digits() const { return x_ref_slice_min_digits; };
231  const std::shared_ptr<entrepot> & get_ref_entrepot() const { return x_ref_entrepot; };
232  bool get_header_only() const { return x_header_only; };
233 
234 
235  private:
236  crypto_algo x_crypto;
237  secu_string x_pass;
238  U_32 x_crypto_size;
239  std::string x_input_pipe;
240  std::string x_output_pipe;
241  std::string x_execute;
242  bool x_info_details;
243  bool x_lax;
244  bool x_sequential_read;
245  infinint x_slice_min_digits;
246  std::shared_ptr<entrepot> x_entrepot;
247  bool x_ignore_signature_check_failure;
248  bool x_multi_threaded;
249 
250 
251  // external catalogue relative fields
252  bool external_cat;
253  path x_ref_chem;
254  std::string x_ref_basename;
255  crypto_algo x_ref_crypto;
256  secu_string x_ref_pass;
257  U_32 x_ref_crypto_size;
258  std::string x_ref_execute;
259  infinint x_ref_slice_min_digits;
260  std::shared_ptr<entrepot> x_ref_entrepot;
261  bool x_header_only;
262 
263  void copy_from(const archive_options_read & ref);
264  void move_from(archive_options_read && ref) noexcept;
265  };
266 
267 
271 
273 
275  {
276  public:
277  // default constructors and destructor.
278 
281  archive_options_create(archive_options_create && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
282  archive_options_create & operator = (const archive_options_create & ref) { destroy(); copy_from(ref); return *this; };
283  archive_options_create & operator = (archive_options_create && ref) noexcept { move_from(std::move(ref)); return *this; };
284  ~archive_options_create() { destroy(); };
285 
287  // set back to default (this is the state just after the object is constructed
288  // this method is to be used to reuse a given object
289 
291  void clear();
292 
293 
295  // setting methods
296 
298  void set_reference(std::shared_ptr<archive> ref_arch) { x_ref_arch = ref_arch; };
299 
301  void set_selection(const mask & selection);
302 
304  void set_subtree(const mask & subtree);
305 
307  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
308 
310  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
311 
313 
318  void set_info_details(bool info_details) { x_info_details = info_details; };
319 
321 
324  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
325 
327  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
328 
330  void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
331 
333  void set_pause(const infinint & pause) { x_pause = pause; };
334 
336  void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
337 
339  void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
340 
342  void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
343 
345 
349  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
350  {
351  x_file_size = file_size;
352  if(first_file_size.is_zero())
353  x_first_file_size = file_size;
354  else
355  x_first_file_size = first_file_size;
356  };
357 
358 
360  void set_ea_mask(const mask & ea_mask);
361 
363 
373  void set_execute(const std::string & execute) { x_execute = execute; };
374 
376  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
377 
380  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
381 
383  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
384 
386 
392  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
393 
394 
396  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
397 
399  void set_compr_mask(const mask & compr_mask);
400 
402  void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
403 
405  void set_nodump(bool nodump) { x_nodump = nodump; };
406 
409  void set_exclude_by_ea(const std::string & ea_name)
410  { exclude_by_ea = (ea_name == "" ? "user.libdar_no_backup" : ea_name); };
411 
413  void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
414 
416  void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
417 
419  void set_empty(bool empty) { x_empty = empty; };
420 
422 
425  void set_alter_atime(bool alter_atime)
426  {
427  if(x_furtive_read)
428  x_old_alter_atime = alter_atime;
429  else
430  x_alter_atime = alter_atime;
431  };
432 
434  void set_furtive_read_mode(bool furtive_read);
435 
437  void set_same_fs(bool same_fs) { x_same_fs = same_fs; };
438 
440  void set_snapshot(bool snapshot) { x_snapshot = snapshot; };
441 
443  void set_cache_directory_tagging(bool cache_directory_tagging) { x_cache_directory_tagging = cache_directory_tagging; };
444 
446  void set_fixed_date(const infinint & fixed_date) { x_fixed_date = fixed_date; };
447 
449  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
450 
452  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
453 
455  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
456 
458  void set_retry_on_change(const infinint & count_max_per_file, const infinint & global_max_byte_overhead = 0) { x_repeat_count = count_max_per_file; x_repeat_byte = global_max_byte_overhead; };
459 
461  void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
462 
464  void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
465 
467  void set_security_check(bool check) { x_security_check = check; };
468 
470  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
471 
473 
476  void set_hash_algo(hash_algo hash) { x_hash = hash; };
477 
479  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
480 
482  void set_backup_hook(const std::string & execute, const mask & which_files);
483 
485  void set_ignore_unknown_inode_type(bool val) { x_ignore_unknown = val; };
486 
488  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_create::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
489 
491  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
492 
494  void set_multi_threaded(bool val) { x_multi_threaded = val; };
495 
497 
499  void set_delta_diff(bool val) { if(val && !compile_time::librsync()) throw Ecompilation("librsync"); x_delta_diff = val; };
500 
502  void set_delta_signature(bool val) { x_delta_signature = val; };
503 
505  void set_delta_mask(const mask & delta_mask);
506 
508 
510  void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
511 
513  void set_auto_zeroing_neg_dates(bool val) { x_auto_zeroing_neg_dates = val; };
514 
516 
519  void set_ignored_as_symlink(const std::set<std::string> & list) { x_ignored_as_symlink = list; };
520 
522 
523  void set_modified_data_detection(modified_data_detection val) { x_modified_data_detection = val; };
524 
526  void set_iteration_count(const infinint & val) { x_iteration_count = val; };
527 
529  void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
530 
531 
533  // getting methods
534 
535  std::shared_ptr<archive> get_reference() const { return x_ref_arch; };
536  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
537  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
538  bool get_allow_over() const { return x_allow_over; };
539  bool get_warn_over() const { return x_warn_over; };
540  bool get_info_details() const { return x_info_details; };
541  bool get_display_treated() const { return x_display_treated; };
542  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
543  bool get_display_skipped() const { return x_display_skipped; };
544  bool get_display_finished() const { return x_display_finished; };
545  const infinint & get_pause() const { return x_pause; };
546  bool get_empty_dir() const { return x_empty_dir; };
547  compression get_compression() const { return x_compr_algo; };
548  U_I get_compression_level() const { return x_compression_level; };
549  const infinint & get_slice_size() const { return x_file_size; };
550  const infinint & get_first_slice_size() const { return x_first_file_size; };
551  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
552  const std::string & get_execute() const { return x_execute; };
553  crypto_algo get_crypto_algo() const { return x_crypto; };
554  const secu_string & get_crypto_pass() const { return x_pass; };
555  U_32 get_crypto_size() const { return x_crypto_size; };
556  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
557  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
558  const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
559  const infinint & get_min_compr_size() const { return x_min_compr_size; };
560  bool get_nodump() const { return x_nodump; };
561  const std::string & get_exclude_by_ea() const { return exclude_by_ea; };
562  comparison_fields get_comparison_fields() const { return x_what_to_check; };
563  const infinint & get_hourshift() const { return x_hourshift; };
564  bool get_empty() const { return x_empty; };
565  bool get_alter_atime() const { return x_alter_atime; };
566  bool get_furtive_read_mode() const { return x_furtive_read; };
567  bool get_same_fs() const { return x_same_fs; };
568  bool get_snapshot() const { return x_snapshot; };
569  bool get_cache_directory_tagging() const { return x_cache_directory_tagging; };
570  const infinint & get_fixed_date() const { return x_fixed_date; };
571  const std::string & get_slice_permission() const { return x_slice_permission; };
572  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
573  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
574  const infinint & get_repeat_count() const { return x_repeat_count; };
575  const infinint & get_repeat_byte() const { return x_repeat_byte; };
576  bool get_sequential_marks() const { return x_sequential_marks; };
577  infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
578  bool get_security_check() const { return x_security_check; };
579  const std::string & get_user_comment() const { return x_user_comment; };
580  hash_algo get_hash_algo() const { return x_hash; };
581  infinint get_slice_min_digits() const { return x_slice_min_digits; };
582  const std::string & get_backup_hook_file_execute() const { return x_backup_hook_file_execute; };
583  const mask & get_backup_hook_file_mask() const { return *x_backup_hook_file_mask; };
584  bool get_ignore_unknown_inode_type() const { return x_ignore_unknown; };
585  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
586  const fsa_scope & get_fsa_scope() const { return x_scope; };
587  bool get_multi_threaded() const { return x_multi_threaded; };
588  bool get_delta_diff() const { return x_delta_diff; };
589  bool get_delta_signature() const { return x_delta_signature; };
590  const mask & get_delta_mask() const { return *x_delta_mask; }
591  bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
592  const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
593  bool get_auto_zeroing_neg_dates() const { return x_auto_zeroing_neg_dates; };
594  const std::set<std::string> & get_ignored_as_symlink() const { return x_ignored_as_symlink; };
595  modified_data_detection get_modified_data_detection() const { return x_modified_data_detection; };
596  const infinint & get_iteration_count() const { return x_iteration_count; };
597  hash_algo get_kdf_hash() const { return x_kdf_hash; };
598 
599  private:
600  std::shared_ptr<archive> x_ref_arch;
603  bool x_allow_over;
604  bool x_warn_over;
605  bool x_info_details;
606  bool x_display_treated;
607  bool x_display_treated_only_dir;
608  bool x_display_skipped;
609  bool x_display_finished;
610  infinint x_pause;
611  bool x_empty_dir;
612  compression x_compr_algo;
613  U_I x_compression_level;
614  infinint x_file_size;
615  infinint x_first_file_size;
617  std::string x_execute;
618  crypto_algo x_crypto;
619  secu_string x_pass;
620  U_32 x_crypto_size;
621  std::vector<std::string> x_gnupg_recipients;
622  std::vector<std::string> x_gnupg_signatories;
624  infinint x_min_compr_size;
625  bool x_nodump;
626  std::string exclude_by_ea;
627  comparison_fields x_what_to_check;
628  infinint x_hourshift;
629  bool x_empty;
630  bool x_alter_atime;
632  bool x_furtive_read;
633  bool x_same_fs;
634  bool x_snapshot;
635  bool x_cache_directory_tagging;
636  infinint x_fixed_date;
637  std::string x_slice_permission;
638  std::string x_slice_user_ownership;
639  std::string x_slice_group_ownership;
640  infinint x_repeat_count;
641  infinint x_repeat_byte;
642  bool x_sequential_marks;
643  infinint x_sparse_file_min_size;
644  bool x_security_check;
645  std::string x_user_comment;
646  hash_algo x_hash;
647  infinint x_slice_min_digits;
648  mask * x_backup_hook_file_mask;
649  std::string x_backup_hook_file_execute;
650  bool x_ignore_unknown;
651  std::shared_ptr<entrepot> x_entrepot;
652  fsa_scope x_scope;
653  bool x_multi_threaded;
654  bool x_delta_diff;
655  bool x_delta_signature;
656  mask *x_delta_mask;
657  bool has_delta_mask_been_set;
658  infinint x_delta_sig_min_size;
659  bool x_auto_zeroing_neg_dates;
660  std::set<std::string> x_ignored_as_symlink;
661  modified_data_detection x_modified_data_detection;
662  infinint x_iteration_count;
663  hash_algo x_kdf_hash;
664 
665  void nullifyptr() noexcept;
666  void destroy() noexcept;
667  void copy_from(const archive_options_create & ref);
668  void move_from(archive_options_create && ref) noexcept;
669  void destroy_mask(mask * & ptr);
670  void clean_mask(mask * & ptr);
671  void check_mask(const mask & m);
672  };
673 
674 
675 
676 
677 
678 
682 
684 
686  {
687  public:
688  archive_options_isolate();
689  archive_options_isolate(const archive_options_isolate & ref);
690  archive_options_isolate(archive_options_isolate && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
691  archive_options_isolate & operator = (const archive_options_isolate & ref) { destroy(); copy_from(ref); return *this; };
692  archive_options_isolate & operator = (archive_options_isolate && ref) noexcept { move_from(std::move(ref)); return *this; };
693  ~archive_options_isolate() { destroy(); };
694 
695 
696  void clear();
697 
699  // setting methods
700 
702  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
703 
705  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
706 
708  void set_info_details(bool info_details) { x_info_details = info_details; };
709 
711  void set_pause(const infinint & pause) { x_pause = pause; };
712 
714  void set_compression(compression algo) { x_algo = algo; };
715 
717  void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
718 
720 
724  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
725  {
726  x_file_size = file_size;
727  if(first_file_size.is_zero())
728  x_first_file_size = file_size;
729  else
730  x_first_file_size = first_file_size;
731  };
732 
734 
744  void set_execute(const std::string & execute) { x_execute = execute; };
745 
747  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
748 
750  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
751 
753  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
754 
757  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
758 
760  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
761 
763  void set_empty(bool empty) { x_empty = empty; };
764 
766  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
767 
769  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
770 
772  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
773 
775  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
776 
778  void set_hash_algo(hash_algo hash) { x_hash = hash; };
779 
781  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
782 
784  void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
785 
787  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_isolated::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
788 
790  void set_multi_threaded(bool val) { x_multi_threaded = val; };
791 
793  void set_delta_signature(bool val) { x_delta_signature = val; };
794 
796  void set_delta_mask(const mask & delta_mask);
797 
801  void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
802 
804  void set_iteration_count(const infinint & val) { x_iteration_count = val; };
805 
807  void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
808 
809 
811  // getting methods
812 
813  bool get_allow_over() const { return x_allow_over; };
814  bool get_warn_over() const { return x_warn_over; };
815  bool get_info_details() const { return x_info_details; };
816  const infinint & get_pause() const { return x_pause; };
817  compression get_compression() const { return x_algo; };
818  U_I get_compression_level() const { return x_compression_level; };
819  const infinint & get_slice_size() const { return x_file_size; };
820  const infinint & get_first_slice_size() const { return x_first_file_size; };
821  const std::string & get_execute() const { return x_execute; };
822  crypto_algo get_crypto_algo() const { return x_crypto; };
823  const secu_string & get_crypto_pass() const { return x_pass; };
824  U_32 get_crypto_size() const { return x_crypto_size; };
825  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
826  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
827  bool get_empty() const { return x_empty; };
828  const std::string & get_slice_permission() const { return x_slice_permission; };
829  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
830  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
831  const std::string & get_user_comment() const { return x_user_comment; };
832  hash_algo get_hash_algo() const { return x_hash; };
833  infinint get_slice_min_digits() const { return x_slice_min_digits; };
834  bool get_sequential_marks() const { return x_sequential_marks; };
835  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
836  bool get_multi_threaded() const { return x_multi_threaded; };
837  bool get_delta_signature() const { return x_delta_signature; };
838  const mask & get_delta_mask() const { return *x_delta_mask; }
839  bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
840  const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
841  const infinint & get_iteration_count() const { return x_iteration_count; };
842  hash_algo get_kdf_hash() const { return x_kdf_hash; };
843 
844  private:
845  bool x_allow_over;
846  bool x_warn_over;
847  bool x_info_details;
848  infinint x_pause;
849  compression x_algo;
850  U_I x_compression_level;
851  infinint x_file_size;
852  infinint x_first_file_size;
853  std::string x_execute;
854  crypto_algo x_crypto;
855  secu_string x_pass;
856  U_32 x_crypto_size;
857  std::vector<std::string> x_gnupg_recipients;
858  std::vector<std::string> x_gnupg_signatories;
859  bool x_empty;
860  std::string x_slice_permission;
861  std::string x_slice_user_ownership;
862  std::string x_slice_group_ownership;
863  std::string x_user_comment;
864  hash_algo x_hash;
865  infinint x_slice_min_digits;
866  bool x_sequential_marks;
867  std::shared_ptr<entrepot> x_entrepot;
868  bool x_multi_threaded;
869  bool x_delta_signature;
870  mask *x_delta_mask;
871  bool has_delta_mask_been_set;
872  infinint x_delta_sig_min_size;
873  infinint x_iteration_count;
874  hash_algo x_kdf_hash;
875 
876  void copy_from(const archive_options_isolate & ref);
877  void move_from(archive_options_isolate && ref) noexcept;
878  void destroy() noexcept;
879  void nullifyptr() noexcept;
880  };
881 
882 
883 
887 
890  {
891  public:
892 
893  archive_options_merge() { nullifyptr(); clear(); };
894  archive_options_merge(const archive_options_merge & ref) { copy_from(ref); };
895  archive_options_merge(archive_options_merge && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
896  archive_options_merge & operator = (const archive_options_merge & ref) { destroy(); copy_from(ref); return *this; };
897  archive_options_merge & operator = (archive_options_merge && ref) noexcept { move_from(std::move(ref)); return *this; };
898  ~archive_options_merge() { destroy(); };
899 
900  void clear();
901 
903  // setting methods
904 
905  void set_auxiliary_ref(std::shared_ptr<archive> ref) { x_ref = ref; };
906 
908  void set_selection(const mask & selection);
909 
911  void set_subtree(const mask & subtree);
912 
914  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
915 
917  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
918 
920  void set_overwriting_rules(const crit_action & overwrite);
921 
923 
928  void set_info_details(bool info_details) { x_info_details = info_details; };
929 
931 
934  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
935 
937  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
938 
940  void set_pause(const infinint & pause) { x_pause = pause; };
941 
943  void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
944 
946  void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
947 
949  void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
950 
952 
956  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
957  {
958  x_file_size = file_size;
959  if(first_file_size.is_zero())
960  x_first_file_size = file_size;
961  else
962  x_first_file_size = first_file_size;
963  };
964 
966  void set_ea_mask(const mask & ea_mask);
967 
969 
979  void set_execute(const std::string & execute) { x_execute = execute; };
980 
982  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
983 
986  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
987 
989  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
990 
993  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
994 
996  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
997 
999  void set_compr_mask(const mask & compr_mask);
1000 
1002  void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
1003 
1005  void set_empty(bool empty) { x_empty = empty; };
1006 
1008  void set_keep_compressed(bool keep_compressed) { x_keep_compressed = keep_compressed; };
1009 
1011  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1012 
1014  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1015 
1017  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1018 
1020  void set_decremental_mode(bool mode) { x_decremental = mode; };
1021 
1023  void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
1024 
1026  void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
1027 
1029  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1030 
1032  void set_hash_algo(hash_algo hash) { x_hash = hash; };
1033 
1035  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1036 
1038  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_merge::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
1039 
1041  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1042 
1044  void set_multi_threaded(bool val) { x_multi_threaded = val; };
1045 
1051  void set_delta_signature(bool val) { x_delta_signature = val; };
1052 
1054  void set_delta_mask(const mask & delta_mask);
1055 
1057 
1059  void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
1060 
1062  void set_iteration_count(const infinint & val) { x_iteration_count = val; };
1063 
1065  void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
1066 
1067 
1068 
1070  // getting methods
1071 
1072  std::shared_ptr<archive> get_auxiliary_ref() const { return x_ref; };
1073  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1074  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1075  bool get_allow_over() const { return x_allow_over; };
1076  bool get_warn_over() const { return x_warn_over; };
1077  const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1078  bool get_info_details() const { return x_info_details; };
1079  bool get_display_treated() const { return x_display_treated; };
1080  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1081  bool get_display_skipped() const { return x_display_skipped; };
1082  const infinint & get_pause() const { return x_pause; };
1083  bool get_empty_dir() const { return x_empty_dir; };
1084  compression get_compression() const { return x_compr_algo; };
1085  U_I get_compression_level() const { return x_compression_level; };
1086  const infinint & get_slice_size() const { return x_file_size; };
1087  const infinint & get_first_slice_size() const { return x_first_file_size; };
1088  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1089  const std::string & get_execute() const { return x_execute; };
1090  crypto_algo get_crypto_algo() const { return x_crypto; };
1091  const secu_string & get_crypto_pass() const { return x_pass; };
1092  U_32 get_crypto_size() const { return x_crypto_size; };
1093  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1094  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1095  const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
1096  const infinint & get_min_compr_size() const { return x_min_compr_size; };
1097  bool get_empty() const { return x_empty; };
1098  bool get_keep_compressed() const { return x_keep_compressed; };
1099  const std::string & get_slice_permission() const { return x_slice_permission; };
1100  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1101  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1102  bool get_decremental_mode() const { return x_decremental; };
1103  bool get_sequential_marks() const { return x_sequential_marks; };
1104  infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
1105  const std::string & get_user_comment() const { return x_user_comment; };
1106  hash_algo get_hash_algo() const { return x_hash; };
1107  infinint get_slice_min_digits() const { return x_slice_min_digits; };
1108  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1109  const fsa_scope & get_fsa_scope() const { return x_scope; };
1110  bool get_multi_threaded() const { return x_multi_threaded; };
1111  bool get_delta_signature() const { return x_delta_signature; };
1112  const mask & get_delta_mask() const { return *x_delta_mask; }
1113  bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
1114  const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
1115  const infinint & get_iteration_count() const { return x_iteration_count; };
1116  hash_algo get_kdf_hash() const { return x_kdf_hash; };
1117 
1118  private:
1119  std::shared_ptr<archive> x_ref;
1120  mask * x_selection;
1121  mask * x_subtree;
1122  bool x_allow_over;
1123  bool x_warn_over;
1124  crit_action * x_overwrite;
1125  bool x_info_details;
1126  bool x_display_treated;
1127  bool x_display_treated_only_dir;
1128  bool x_display_skipped;
1129  infinint x_pause;
1130  bool x_empty_dir;
1131  compression x_compr_algo;
1132  U_I x_compression_level;
1133  infinint x_file_size;
1134  infinint x_first_file_size;
1135  mask * x_ea_mask;
1136  std::string x_execute;
1137  crypto_algo x_crypto;
1138  secu_string x_pass;
1139  U_32 x_crypto_size;
1140  std::vector<std::string> x_gnupg_recipients;
1141  std::vector<std::string> x_gnupg_signatories;
1142  mask * x_compr_mask;
1143  infinint x_min_compr_size;
1144  bool x_empty;
1145  bool x_keep_compressed;
1146  std::string x_slice_permission;
1147  std::string x_slice_user_ownership;
1148  std::string x_slice_group_ownership;
1149  bool x_decremental;
1150  bool x_sequential_marks;
1151  infinint x_sparse_file_min_size;
1152  std::string x_user_comment;
1153  hash_algo x_hash;
1154  infinint x_slice_min_digits;
1155  std::shared_ptr<entrepot> x_entrepot;
1156  fsa_scope x_scope;
1157  bool x_multi_threaded;
1158  bool x_delta_signature;
1159  mask *x_delta_mask;
1160  bool has_delta_mask_been_set;
1161  infinint x_delta_sig_min_size;
1162  infinint x_iteration_count;
1163  hash_algo x_kdf_hash;
1164 
1165  void destroy() noexcept;
1166  void copy_from(const archive_options_merge & ref);
1167  void move_from(archive_options_merge && ref) noexcept;
1168  void nullifyptr() noexcept;
1169  };
1170 
1171 
1175 
1178  {
1179  public:
1180  enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1181 
1182  archive_options_extract() { nullifyptr(); clear(); };
1183  archive_options_extract(const archive_options_extract & ref) { copy_from(ref); };
1184  archive_options_extract(archive_options_extract && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1185  archive_options_extract & operator = (const archive_options_extract & ref) { destroy(); copy_from(ref); return *this; };
1186  archive_options_extract & operator = (archive_options_extract && ref) noexcept { move_from(std::move(ref)); return *this; };
1187  ~archive_options_extract() { destroy(); };
1188 
1189  void clear();
1190 
1192  // setting methods
1193 
1195  void set_selection(const mask & selection);
1196 
1198  void set_subtree(const mask & subtree);
1199 
1201  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1202 
1209  void set_info_details(bool info_details) { x_info_details = info_details; };
1210 
1214  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1215 
1217  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1218 
1220  void set_ea_mask(const mask & ea_mask);
1221 
1223  void set_flat(bool flat) { x_flat = flat; };
1224 
1226  void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1227 
1229  void set_warn_remove_no_match(bool warn_remove_no_match) { x_warn_remove_no_match = warn_remove_no_match; };
1230 
1232  void set_empty(bool empty) { x_empty = empty; };
1233 
1235  void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
1236 
1238 
1241  void set_dirty_behavior(bool ignore, bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1242 
1244  void set_dirty_behavior(t_dirty val) { x_dirty = val; };
1245 
1247  void set_overwriting_rules(const crit_action & over);
1248 
1250 
1252  void set_only_deleted(bool val) { x_only_deleted = val; };
1253 
1254 
1256 
1258  void set_ignore_deleted(bool val) { x_ignore_deleted = val; };
1259 
1261  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1262 
1263 
1265  // getting methods
1266 
1267  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1268  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1269  bool get_warn_over() const { return x_warn_over; };
1270  bool get_info_details() const { return x_info_details; };
1271  bool get_display_treated() const { return x_display_treated; };
1272  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1273  bool get_display_skipped() const { return x_display_skipped; };
1274  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1275  bool get_flat() const { return x_flat; };
1276  comparison_fields get_what_to_check() const { return x_what_to_check; };
1277  bool get_warn_remove_no_match() const { return x_warn_remove_no_match; };
1278  bool get_empty() const { return x_empty; };
1279  bool get_empty_dir() const { return x_empty_dir; };
1280  t_dirty get_dirty_behavior() const { return x_dirty; }
1281  const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1282  bool get_only_deleted() const { return x_only_deleted; };
1283  bool get_ignore_deleted() const { return x_ignore_deleted; };
1284  const fsa_scope & get_fsa_scope() const { return x_scope; };
1285 
1286  private:
1287  mask * x_selection;
1288  mask * x_subtree;
1289  bool x_warn_over;
1290  bool x_info_details;
1291  bool x_display_treated;
1292  bool x_display_treated_only_dir;
1293  bool x_display_skipped;
1294  mask * x_ea_mask;
1295  bool x_flat;
1296  comparison_fields x_what_to_check;
1297  bool x_warn_remove_no_match;
1298  bool x_empty;
1299  bool x_empty_dir;
1300  t_dirty x_dirty;
1301  crit_action *x_overwrite;
1302  bool x_only_deleted;
1303  bool x_ignore_deleted;
1304  fsa_scope x_scope;
1305 
1306  void destroy() noexcept;
1307  void nullifyptr() noexcept;
1308  void copy_from(const archive_options_extract & ref);
1309  void move_from(archive_options_extract && ref) noexcept;
1310  };
1311 
1312 
1313 
1314 
1318 
1321  {
1322  public:
1323  archive_options_listing() { nullifyptr(); clear(); };
1324  archive_options_listing(const archive_options_listing & ref) { copy_from(ref); };
1325  archive_options_listing(archive_options_listing && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1326  archive_options_listing & operator = (const archive_options_listing & ref) { destroy(); copy_from(ref); return *this; };
1327  archive_options_listing & operator = (archive_options_listing && ref) noexcept { move_from(std::move(ref)); return *this; };
1328  virtual ~archive_options_listing() { destroy(); };
1329 
1330  virtual void clear();
1331 
1332 
1334  // setting methods
1335 
1337  void set_info_details(bool info_details) { x_info_details = info_details; };
1338 
1340 
1342  void set_selection(const mask & selection);
1343 
1345 
1347  void set_subtree(const mask & subtree);
1348 
1350  void set_filter_unsaved(bool filter_unsaved) { x_filter_unsaved = filter_unsaved; };
1351 
1353  void set_slicing_location(bool val) { x_slicing_location = val; };
1354 
1356 
1360  void set_user_slicing(const infinint & slicing_first, const infinint & slicing_others);
1361 
1363 
1365  void set_display_ea(bool display_ea) { x_display_ea = display_ea; };
1366 
1367 
1369  // getting methods
1370 
1371  bool get_info_details() const { return x_info_details; };
1372  const mask & get_selection() const;
1373  const mask & get_subtree() const;
1374  bool get_filter_unsaved() const { return x_filter_unsaved; };
1375  bool get_user_slicing(infinint & slicing_first, infinint & slicing_others) const;
1376  bool get_slicing_location() const { return x_slicing_location; };
1377  bool get_display_ea() const { return x_display_ea; };
1378 
1379  private:
1380  bool x_info_details;
1381  mask * x_selection;
1382  mask * x_subtree;
1383  bool x_filter_unsaved;
1384  infinint *x_slicing_first;
1385  infinint *x_slicing_others;
1386  bool x_slicing_location;
1387  bool x_display_ea;
1388 
1389  void destroy() noexcept;
1390  void nullifyptr() noexcept;
1391  void copy_from(const archive_options_listing & ref);
1392  void move_from(archive_options_listing && ref) noexcept;
1393  };
1394 
1398 
1399 
1400  class archive_options_diff
1401  {
1402  public:
1403  archive_options_diff() { nullifyptr(); clear(); };
1404  archive_options_diff(const archive_options_diff & ref) { copy_from(ref); };
1405  archive_options_diff(archive_options_diff && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1406  archive_options_diff & operator = (const archive_options_diff & ref) { destroy(); copy_from(ref); return *this; };
1407  archive_options_diff & operator = (archive_options_diff && ref) noexcept { move_from(std::move(ref)); return *this; };
1408  ~archive_options_diff() { destroy(); };
1409 
1410  void clear();
1411 
1413  // setting methods
1414 
1416  void set_selection(const mask & selection);
1417 
1419  void set_subtree(const mask & subtree);
1420 
1427  void set_info_details(bool info_details) { x_info_details = info_details; };
1428 
1432  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1433 
1435  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1436 
1438  void set_ea_mask(const mask & ea_mask);
1439 
1441  void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1442 
1444 
1447  void set_alter_atime(bool alter_atime)
1448  {
1449  if(x_furtive_read)
1450  x_old_alter_atime = alter_atime;
1451  else
1452  x_alter_atime = alter_atime;
1453  };
1454 
1456  void set_furtive_read_mode(bool furtive_read);
1457 
1459  void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
1460 
1462  void set_compare_symlink_date(bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1463 
1465  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1466 
1467 
1469  // getting methods
1470 
1471  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1472  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1473  bool get_info_details() const { return x_info_details; };
1474  bool get_display_treated() const { return x_display_treated; };
1475  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1476  bool get_display_skipped() const { return x_display_skipped; };
1477  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1478  comparison_fields get_what_to_check() const { return x_what_to_check; };
1479  bool get_alter_atime() const { return x_alter_atime; };
1480  bool get_furtive_read_mode() const { return x_furtive_read; };
1481  const infinint & get_hourshift() const { return x_hourshift; };
1482  bool get_compare_symlink_date() const { return x_compare_symlink_date; };
1483  const fsa_scope & get_fsa_scope() const { return x_scope; };
1484 
1485  private:
1486  mask * x_selection;
1487  mask * x_subtree;
1488  bool x_info_details;
1489  bool x_display_treated;
1490  bool x_display_treated_only_dir;
1491  bool x_display_skipped;
1492  mask * x_ea_mask;
1493  comparison_fields x_what_to_check;
1494  bool x_alter_atime;
1495  bool x_old_alter_atime;
1496  bool x_furtive_read;
1497  infinint x_hourshift;
1498  bool x_compare_symlink_date;
1499  fsa_scope x_scope;
1500 
1501  void destroy() noexcept;
1502  void nullifyptr() noexcept;
1503  void copy_from(const archive_options_diff & ref);
1504  void move_from(archive_options_diff && ref) noexcept;
1505  };
1506 
1507 
1508 
1509 
1513 
1516  {
1517  public:
1518  archive_options_test() { nullifyptr(); clear(); };
1519  archive_options_test(const archive_options_test & ref) { copy_from(ref); };
1520  archive_options_test(archive_options_test && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1521  archive_options_test & operator = (const archive_options_test & ref) { destroy(); copy_from(ref); return *this; };
1522  archive_options_test & operator = (archive_options_test && ref) noexcept { move_from(std::move(ref)); return *this; };
1523  ~archive_options_test() { destroy(); };
1524 
1525  void clear();
1526 
1528  // setting methods
1529 
1531  void set_selection(const mask & selection);
1532 
1534  void set_subtree(const mask & subtree);
1535 
1542  void set_info_details(bool info_details) { x_info_details = info_details; };
1543 
1545  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1546 
1550  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1551 
1553  void set_empty(bool empty) { x_empty = empty; };
1554 
1555 
1557  // getting methods
1558 
1559  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1560  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1561  bool get_info_details() const { return x_info_details; };
1562  bool get_display_treated() const { return x_display_treated; };
1563  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1564  bool get_display_skipped() const { return x_display_skipped; };
1565  bool get_empty() const { return x_empty; };
1566 
1567  private:
1568  mask * x_selection;
1569  mask * x_subtree;
1570  bool x_info_details;
1571  bool x_display_treated;
1572  bool x_display_treated_only_dir;
1573  bool x_display_skipped;
1574  bool x_empty;
1575 
1576  void destroy() noexcept;
1577  void nullifyptr() noexcept;
1578  void copy_from(const archive_options_test & ref);
1579  void move_from(archive_options_test && ref) noexcept;
1580  };
1581 
1582 
1586 
1589  {
1590  public:
1591  // default constructors and destructor.
1592 
1595  archive_options_repair(archive_options_repair && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1596  archive_options_repair & operator = (const archive_options_repair & ref) { copy_from(ref); return *this; };
1597  archive_options_repair & operator = (archive_options_repair && ref) noexcept { move_from(std::move(ref)); return *this; };
1598  ~archive_options_repair() = default;
1599 
1601  // set back to default (this is the state just after the object is constructed
1602  // this method is to be used to reuse a given object
1603 
1605  void clear();
1606 
1607 
1609  // setting methods
1610 
1612  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
1613 
1615  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1616 
1623  void set_info_details(bool info_details) { x_info_details = info_details; };
1624 
1629  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1630 
1632  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1633 
1635  void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
1636 
1638  void set_pause(const infinint & pause) { x_pause = pause; };
1639 
1641 
1645  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
1646  {
1647  x_file_size = file_size;
1648  if(first_file_size.is_zero())
1649  x_first_file_size = file_size;
1650  else
1651  x_first_file_size = first_file_size;
1652  };
1653 
1655 
1665  void set_execute(const std::string & execute) { x_execute = execute; };
1666 
1668  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
1669 
1672  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
1673 
1675  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1676 
1683  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1684 
1685 
1687  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1688 
1690  void set_empty(bool empty) { x_empty = empty; };
1691 
1693  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1694 
1696  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1697 
1699  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1700 
1702  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1703 
1707  void set_hash_algo(hash_algo hash) { x_hash = hash; };
1708 
1710  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1711 
1713  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_repair::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
1714 
1716  void set_multi_threaded(bool val) { x_multi_threaded = val; };
1717 
1718 
1720  // getting methods
1721 
1722  bool get_allow_over() const { return x_allow_over; };
1723  bool get_warn_over() const { return x_warn_over; };
1724  bool get_info_details() const { return x_info_details; };
1725  bool get_display_treated() const { return x_display_treated; };
1726  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1727  bool get_display_skipped() const { return x_display_skipped; };
1728  bool get_display_finished() const { return x_display_finished; };
1729  const infinint & get_pause() const { return x_pause; };
1730  const infinint & get_slice_size() const { return x_file_size; };
1731  const infinint & get_first_slice_size() const { return x_first_file_size; };
1732  const std::string & get_execute() const { return x_execute; };
1733  crypto_algo get_crypto_algo() const { return x_crypto; };
1734  const secu_string & get_crypto_pass() const { return x_pass; };
1735  U_32 get_crypto_size() const { return x_crypto_size; };
1736  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1737  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1738  bool get_empty() const { return x_empty; };
1739  const std::string & get_slice_permission() const { return x_slice_permission; };
1740  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1741  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1742  const std::string & get_user_comment() const { return x_user_comment; };
1743  hash_algo get_hash_algo() const { return x_hash; };
1744  infinint get_slice_min_digits() const { return x_slice_min_digits; };
1745  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1746  bool get_multi_threaded() const { return x_multi_threaded; };
1747 
1748  private:
1749  bool x_allow_over;
1750  bool x_warn_over;
1751  bool x_info_details;
1752  bool x_display_treated;
1753  bool x_display_treated_only_dir;
1754  bool x_display_skipped;
1755  bool x_display_finished;
1756  infinint x_pause;
1757  infinint x_file_size;
1758  infinint x_first_file_size;
1759  std::string x_execute;
1760  crypto_algo x_crypto;
1761  secu_string x_pass;
1762  U_32 x_crypto_size;
1763  std::vector<std::string> x_gnupg_recipients;
1764  std::vector<std::string> x_gnupg_signatories;
1765  bool x_empty;
1766  std::string x_slice_permission;
1767  std::string x_slice_user_ownership;
1768  std::string x_slice_group_ownership;
1769  std::string x_user_comment;
1770  hash_algo x_hash;
1771  infinint x_slice_min_digits;
1772  std::shared_ptr<entrepot> x_entrepot;
1773  bool x_multi_threaded;
1774 
1775  void nullifyptr() noexcept {};
1776  void copy_from(const archive_options_repair & ref);
1777  void move_from(archive_options_repair && ref) noexcept;
1778  };
1779 
1781 
1782 } // end of namespace
1783 
1784 #endif
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:52
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA are considered) ...
void set_auto_zeroing_neg_dates(bool val)
whether to automatically zeroing negative dates read from the filesystem (just warn, don&#39;t ask whether to pursue)
here lies a mask that selects files present in a given listThe mask_list classes defined here is to b...
defines the entrepot interface. Entrepot interface defines a generic way to interact with files (slic...
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_hash_algo(hash_algo hash)
void set_external_catalogue(const path &ref_chem, const std::string &ref_basename)
defines whether or not to use the catalogue from an extracted catalogue (instead of the one embedded ...
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_alter_atime(bool alter_atime)
whether to alter atime or ctime in the filesystem when reading files to save
filesystem specific attributes available families and fsa_scope definition
void set_display_treated(bool display_treated, bool only_dir)
the generic class, parent of all masks
Definition: mask.hpp:61
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_multi_threaded(bool val)
whether libdar is allowed to create several thread to work possilbiy faster on multicore CPU (need li...
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
void set_crypto_algo(crypto_algo crypto)
cypher to use
are defined here basic integer types that tend to be portable
void set_ignore_unknown_inode_type(bool val)
whether to ignore unknown inode types instead of issuing a warning
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
void set_sequential_marks(bool sequential)
whether to activate escape sequence aka tape marks to allow sequential reading of the archive ...
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
void set_what_to_check(comparison_fields what_to_check)
fields to consider when comparing inodes with those on filesystem to determine if it is more recent (...
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_crypto_pass(const secu_string &pass)
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
void set_crypto_size(U_32 crypto_size)
the encryption block size to use to decrypt
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_decremental_mode(bool mode)
if set to true use a merging mode suitable to build a decremental backup from two full backups (see N...
void set_warn_remove_no_match(bool warn_remove_no_match)
whether a warning must be issue if a file to remove does not match the expected type of file ...
void set_execute(const std::string &execute)
set the command to execute before reading each slice (empty string for no script) ...
void set_header_only(bool val)
whether we only read the archive header and exit
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_empty(bool empty)
whether to make a dry-run operation
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
archive_options_read(const archive_options_read &ref)
the copy constructor, assignment operator and destructor
void set_only_deleted(bool val)
only consider deleted files (if set, no data get restored)
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
exception used when a requested fearture has not beed activated at compilation time ...
Definition: erreurs.hpp:365
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
void set_fixed_date(const infinint &fixed_date)
whether to ignore any archive of reference and only save file which modification is more recent that ...
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
class holding optional parameters used to test the structure coherence of an existing archive ...
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive ...
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
mask * x_subtree
points to a local copy of mask (must be allocated / releases by the archive_option_create objects) ...
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_what_to_check(comparison_fields what_to_check)
set the fields to consider when comparing inodes with reference archive (see comparison_fields enumer...
void set_ignored_as_symlink(const std::set< std::string > &list)
provide a list of full path which if are symlinks will be considered as the inode they point to ...
void set_default_crypto_size()
set the encryption block size to the default value
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_exclude_by_ea(const std::string &ea_name)
nested namespace containing routines that give features activated at compile time ...
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
archive_options_read()
build an object and set options to their default values
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
void set_empty_dir(bool empty_dir)
whether to restore directories where no file has been triggered for backup (no file/inode change...
void clear()
reset all the options to their default values
void set_hourshift(const infinint &hourshift)
ignore differences of at most this integer number of hours while looking for changes in dates ...
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices
void set_delta_sig_min_size(const infinint &val)
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
void set_crypto_pass(const secu_string &pass)
defines the password or passphrase to decrypt (unused if encryption is not set)
void set_pause(const infinint &pause)
Pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each slice...
the crypto algoritm definition
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_filter_unsaved(bool filter_unsaved)
whether to only show entries that have their data fully saved
void set_empty(bool empty)
defines whether we need to store ignored directories as empty
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio...
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
set the list of recipients that will be able to read the archive
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio...
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
void set_display_ea(bool display_ea)
whether to fetch EA for listing
bool librsync() noexcept
returns whether delta compression is available and delta diff stuff with it
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_allow_over(bool allow_over)
whether overwritting is allowed
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_info_details(bool info_details)
whether the user needs detailed output of the operation
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
void set_ignore_signature_check_failure(bool val)
whether to warn (true) or ignore (false) signature failure (default is true)
void set_empty(bool empty)
whether to make a dry-run operation
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_display_treated(bool display_treated, bool only_dir)
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_compression(compression algo)
the compression algorithm used
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_info_details(bool info_details)
void set_reference(std::shared_ptr< archive > ref_arch)
set the archive to take as reference (nullptr for a full backup)
void set_ref_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices of the reference archive (where the external catalogue...
mask * x_compr_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects) ...
void set_empty(bool empty)
dry-run exectution if set to true
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive ...
void set_snapshot(bool snapshot)
whether to make an emtpy archive only referencing the current state of files in the filesystem ...
void set_ref_crypto_size(U_32 ref_crypto_size)
defines the crypto size for the reference catalogue
crypto_algo
the different cypher available for encryption (strong or weak)
Definition: crypto.hpp:49
void set_empty(bool empty)
defines whether we do a dry-run execution
void set_same_fs(bool same_fs)
whether to limit the backup to files located on the same filesystem as the directory taken as root of...
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
compression parameters for API
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
void set_crypto_pass(const secu_string &pass)
password / passphrase to encrypt the data with (empty string for interactive question) ...
void set_crypto_pass(const secu_string &pass)
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_ref_crypto_pass(const secu_string &ref_pass)
defines the pass for the reference catalogue
void set_info_details(bool info_details)
whether output should be verbosed –> to be moved to shell output
void set_compression_level(U_I compression_level)
the compression level (from 1 to 9)
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_dirty_behavior(bool ignore, bool warn)
whether to restore dirty files (those that changed during backup), warn before restoring or ignoring ...
void set_keep_compressed(bool keep_compressed)
make dar ignore the &#39;algo&#39; argument and do not uncompress / compress files that are selected for merg...
the global action for overwriting
Definition: crit_action.hpp:81
void set_crypto_size(U_32 crypto_size)
size of the encryption by block to use
class holding optional parameters used to extract files from an existing archive
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_warn_over(bool warn_over)
whether a warning shall be issued before overwriting
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
void set_compression(compression compr_algo)
set the compression algorithm to be used
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_flat(bool flat)
whether to ignore directory structure and restore all files in the same directory ...
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_slicing_location(bool val)
whether to calculate the slice location of each file
void set_info_details(bool info_details)
void set_iteration_count(const infinint &val)
key derivation
void set_iteration_count(const infinint &val)
key derivation
void set_cache_directory_tagging(bool cache_directory_tagging)
whether to consider the Cache Directory Tagging Standard
bool furtive_read() noexcept
returns whether libdar can support furtive read mode when run by privileged user
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
std::set< fsa_family > fsa_scope
set of fsa families
Definition: fsa_family.hpp:70
void set_info_details(bool info_details)
here lies a collection of mask classes
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
mask * x_ea_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects) ...
void set_ignore_deleted(bool val)
do not consider deleted files (if set, no inode will be removed)
void set_dirty_behavior(t_dirty val)
alternative method to modify dirty behavior
exception used to signal range error
Definition: erreurs.hpp:219
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
void set_compression(compression compr_algo)
set the compression algorithm to be used
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:43
void set_retry_on_change(const infinint &count_max_per_file, const infinint &global_max_byte_overhead=0)
how much time to retry saving a file if it changed while being read
void set_crypto_pass(const secu_string &pass)
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
void set_modified_data_detection(modified_data_detection val)
defines when to resave a file&#39;s data which inode metadata changed
class secu_string
Definition: secu_string.hpp:57
void set_ref_slice_min_digits(infinint val)
defines the minim digit for slice number of the archive of reference (where the external catalogue is...
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
compression
the different compression algorithm available
Definition: compression.hpp:45
void set_input_pipe(const std::string &input_pipe)
set the name of the input pipe to read data from (when basename is set to "-")
void set_delta_sig_min_size(const infinint &val)
whether to never calculate delta signature for files which size is smaller or equal to the given argu...
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_delta_sig_min_size(const infinint &val)
whether to never calculate delta signature for files which size is smaller or equal to the given argu...
class holding optional parameters used to create an archive
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_execute(const std::string &execute)
command to execute after each slice creation
void set_empty(bool empty)
whether to make a dry-run operation
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
void set_ref_crypto_algo(crypto_algo ref_crypto)
defines the crypto algo for the reference catalogue
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
class holding optional parameters used to list the contents of an existing archive ...
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
hash_algo
hashing algorithm available
Definition: archive_aux.hpp:62
bool x_old_alter_atime
used to backup origina alter_atime value when activating furtive read mode
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
the arbitrary large positive integer class
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
void unset_external_catalogue()
clear any reference to an external catalogue
void set_crypto_algo(crypto_algo val)
defines the the crypto cypher to use to read the archive (default is crypto_none) ...
void set_iteration_count(const infinint &val)
key derivation
void set_ref_execute(const std::string &ref_execute)
set the command to execute before reading each slice of the reference catalogue
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
contains classes that let the user define the policy for overwriting files
void set_multi_threaded(bool val)
whether libdar is allowed to created several thread to work possibily faster on multicore CPU (requir...
class holding optional parameters used to read an existing archive
void set_delta_diff(bool val)
whether binary delta has to be computed for differential/incremental backup
class holding optional parameters used to proceed to the merge operation
mask * x_selection
points to a local copy of mask (must be allocated / releases by the archive_option_create object) ...
std::shared_ptr< archive > x_ref_arch
just contains the address of an existing object, no local copy of object is done here ...
void set_output_pipe(const std::string &output_pipe)
set the name of the output pipe to send orders to (when basenale is set to "-")
void set_security_check(bool check)
whether to check for ctime changes since with the archive of reference
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
class holding optional parameters used to create an archive
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
void set_nodump(bool nodump)
defines whether to ignore files with the nodump flag set
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
class holding optional parameters used to isolate an existing archive
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:46
void set_display_treated(bool display_treated, bool only_dir)
void set_lax(bool val)
defines whether any archive coherence error, system error or media error lead to the abortion of the ...
set of datastructures used to interact with a catalogue object
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
bool nodump() noexcept
returns whether nodump flag support has been activated at compilation time
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
void set_sequential_read(bool val)
defines whether to try reading the archive sequentially (ala tar) or using the final catalogue ...
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
the class path is here to manipulate paths in the Unix notation: using&#39;/&#39;
Definition: path.hpp:50
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)