| Disk ARchive 2.7.12 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-2023 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
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"
38#include "compile_time_features.hpp"
39#include "archive_aux.hpp"
40#include "compression.hpp"
41#include "delta_sig_block_size.hpp"
42#include "filesystem_ids.hpp"
43
44#include <string>
45#include <vector>
46#include <set>
47#include <memory>
48
49 namespace libdar
50{
51 class archive; // needed to be able to use pointer on archive object.
52
53
57
60
61
63
64 class archive_options_read
65 {
66 public:
68 archive_options_read();
69
71 archive_options_read(const archive_options_read & ref) : x_ref_chem(ref.x_ref_chem) { copy_from(ref); };
72 archive_options_read(archive_options_read && ref) noexcept;
73 archive_options_read & operator = (const archive_options_read & ref) { copy_from(ref); return *this; };
74 archive_options_read & operator = (archive_options_read && ref) noexcept { move_from(std::move(ref)); return *this; };
75 ~archive_options_read() = default;
76
77
79 // set back to default (this is the state just after the object is constructed
80 // this method is to be used to reuse a given object
81
83 void clear();
84
85
87 // setting methods
88
89
91
97 void set_crypto_algo(crypto_algo val) { x_crypto = val; };
98
100 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
101
103 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
104
106 void set_default_crypto_size();
107
109
112 void set_input_pipe(const std::string & input_pipe) { x_input_pipe = input_pipe; };
113
115
118 void set_output_pipe(const std::string & output_pipe) { x_output_pipe = output_pipe; };
119
121
131 void set_execute(const std::string & execute) { x_execute = execute; };
132
134 void set_info_details(bool info_details) { x_info_details = info_details; };
135
137
141 void set_lax(bool val) { x_lax = val; };
142
144
146
147 void set_sequential_read(bool val) { x_sequential_read = val; };
148
150
151 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
152
153
155 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; };
156
158 void set_ignore_signature_check_failure(bool val) { x_ignore_signature_check_failure = val; };
159
161
164 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
165
167 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
168
170 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
171
172
174
176 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; };
178 void unset_external_catalogue();
179
181 void set_ref_crypto_algo(crypto_algo ref_crypto) { x_ref_crypto = ref_crypto; };
182
184 void set_ref_crypto_pass(const secu_string & ref_pass) { x_ref_pass = ref_pass; };
185
187 void set_ref_crypto_size(U_32 ref_crypto_size) { x_ref_crypto_size = ref_crypto_size; };
188
190
200 void set_ref_execute(const std::string & ref_execute) { x_ref_execute = ref_execute; };
201
202
204
205 void set_ref_slice_min_digits(infinint val) { x_ref_slice_min_digits = val; };
206
208 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; };
209
211 void set_header_only(bool val) { x_header_only = val; };
212
213
214
216 // getting methods (mainly used inside libdar, but kept public and part of the API in the case it is needed)
217
218
219 crypto_algo get_crypto_algo() const { return x_crypto; };
220 const secu_string & get_crypto_pass() const { return x_pass; };
221 U_32 get_crypto_size() const { return x_crypto_size; };
222 const std::string & get_input_pipe() const { return x_input_pipe; };
223 const std::string & get_output_pipe() const { return x_output_pipe; };
224 const std::string & get_execute() const { return x_execute; };
225 bool get_info_details() const { return x_info_details; };
226 bool get_lax() const { return x_lax; };
227 bool get_sequential_read() const { return x_sequential_read; };
228 infinint get_slice_min_digits() const { return x_slice_min_digits; };
229 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
230 bool get_ignore_signature_check_failure() const { return x_ignore_signature_check_failure; };
231 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
232 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
233
234 // All methods that follow concern the archive where to fetch the (isolated) catalogue from
235 bool is_external_catalogue_set() const { return external_cat; };
236 const path & get_ref_path() const;
237 const std::string & get_ref_basename() const;
238 crypto_algo get_ref_crypto_algo() const { return x_ref_crypto; };
239 const secu_string & get_ref_crypto_pass() const { return x_ref_pass; };
240 U_32 get_ref_crypto_size() const { return x_ref_crypto_size; };
241 const std::string & get_ref_execute() const { return x_ref_execute; };
242 infinint get_ref_slice_min_digits() const { return x_ref_slice_min_digits; };
243 const std::shared_ptr<entrepot> & get_ref_entrepot() const { return x_ref_entrepot; };
244 bool get_header_only() const { return x_header_only; };
245
246
247 private:
248 crypto_algo x_crypto;
249 secu_string x_pass;
250 U_32 x_crypto_size;
251 std::string x_input_pipe;
252 std::string x_output_pipe;
253 std::string x_execute;
254 bool x_info_details;
255 bool x_lax;
256 bool x_sequential_read;
257 infinint x_slice_min_digits;
258 std::shared_ptr<entrepot> x_entrepot;
259 bool x_ignore_signature_check_failure;
260 U_I x_multi_threaded_crypto;
261 U_I x_multi_threaded_compress;
262
263
264 // external catalogue relative fields
265 bool external_cat;
266 path x_ref_chem;
267 std::string x_ref_basename;
268 crypto_algo x_ref_crypto;
269 secu_string x_ref_pass;
270 U_32 x_ref_crypto_size;
271 std::string x_ref_execute;
272 infinint x_ref_slice_min_digits;
273 std::shared_ptr<entrepot> x_ref_entrepot;
274 bool x_header_only;
275
276 void copy_from(const archive_options_read & ref);
277 void move_from(archive_options_read && ref) noexcept;
278 };
279
280
284
286
287 class archive_options_create
288 {
289 public:
290 // default constructors and destructor.
291
292 archive_options_create();
293 archive_options_create(const archive_options_create & ref);
294 archive_options_create(archive_options_create && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
295 archive_options_create & operator = (const archive_options_create & ref) { destroy(); copy_from(ref); return *this; };
296 archive_options_create & operator = (archive_options_create && ref) noexcept { move_from(std::move(ref)); return *this; };
297 ~archive_options_create() { destroy(); };
298
300 // set back to default (this is the state just after the object is constructed
301 // this method is to be used to reuse a given object
302
304 void clear();
305
306
308 // setting methods
309
311 void set_reference(std::shared_ptr<archive> ref_arch) { x_ref_arch = ref_arch; };
312
314 void set_selection(const mask & selection);
315
317 void set_subtree(const mask & subtree);
318
320 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
321
323 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
324
326
331 void set_info_details(bool info_details) { x_info_details = info_details; };
332
334
337 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
338
340 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
341
343 void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
344
346 void set_pause(const infinint & pause) { x_pause = pause; };
347
349 void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
350
352 void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
353
355 void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
356
358
367 void set_compression_block_size(U_I compression_block_size) { x_compression_block_size = compression_block_size; };
368
370
374 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
375 {
376 x_file_size = file_size;
377 if(first_file_size.is_zero())
378 x_first_file_size = file_size;
379 else
380 x_first_file_size = first_file_size;
381 };
382
383
385 void set_ea_mask(const mask & ea_mask);
386
388
398 void set_execute(const std::string & execute) { x_execute = execute; };
399
401 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
402
405 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
406
408 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
409
411
419 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
420
421
425 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
426
428 void set_compr_mask(const mask & compr_mask);
429
431 void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
432
434 void set_nodump(bool nodump) { x_nodump = nodump; };
435
438 void set_exclude_by_ea(const std::string & ea_name)
439 { exclude_by_ea = (ea_name == "" ? "user.libdar_no_backup" : ea_name); };
440
442 void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
443
445 void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
446
448 void set_empty(bool empty) { x_empty = empty; };
449
451
454 void set_alter_atime(bool alter_atime)
455 {
456 if(x_furtive_read)
457 x_old_alter_atime = alter_atime;
458 else
459 x_alter_atime = alter_atime;
460 };
461
463 void set_furtive_read_mode(bool furtive_read);
464
466
469 void set_same_fs(bool same_fs) { x_same_fs = same_fs; x_same_fs_include.clear(); x_same_fs_exclude.clear(); };
470
472
474 void set_same_fs_include(const std::string & included_path_to_fs) { x_same_fs_include.push_back(included_path_to_fs); };
475
477
479 void set_same_fs_exclude(const std::string & excluded_path_to_fs) { x_same_fs_exclude.push_back(excluded_path_to_fs); };
480
482 void set_snapshot(bool snapshot) { x_snapshot = snapshot; };
483
485 void set_cache_directory_tagging(bool cache_directory_tagging) { x_cache_directory_tagging = cache_directory_tagging; };
486
488 void set_fixed_date(const infinint & fixed_date) { x_fixed_date = fixed_date; };
489
491 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
492
494 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
495
497 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
498
500 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; };
501
503 void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
504
506 void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
507
509 void set_security_check(bool check) { x_security_check = check; };
510
512 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
513
515
518 void set_hash_algo(hash_algo hash);
519
521 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
522
524 void set_backup_hook(const std::string & execute, const mask & which_files);
525
527 void set_ignore_unknown_inode_type(bool val) { x_ignore_unknown = val; };
528
530 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; };
531
533 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
534
536
539 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
540
542 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
543
545 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
546
548
550 void set_delta_diff(bool val) { if(val && !compile_time::librsync()) throw Ecompilation("librsync"); x_delta_diff = val; };
551
553 void set_delta_signature(bool val) { x_delta_signature = val; };
554
556 void set_delta_mask(const mask & delta_mask);
557
559
561 void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
562
564 void set_auto_zeroing_neg_dates(bool val) { x_auto_zeroing_neg_dates = val; };
565
567
570 void set_ignored_as_symlink(const std::set<std::string> & list) { x_ignored_as_symlink = list; };
571
573
574 void set_modified_data_detection(modified_data_detection val) { x_modified_data_detection = val; };
575
577 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
578
580 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
581
583 void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
584
585
587 // getting methods
588
589 std::shared_ptr<archive> get_reference() const { return x_ref_arch; };
590 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
591 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
592 bool get_allow_over() const { return x_allow_over; };
593 bool get_warn_over() const { return x_warn_over; };
594 bool get_info_details() const { return x_info_details; };
595 bool get_display_treated() const { return x_display_treated; };
596 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
597 bool get_display_skipped() const { return x_display_skipped; };
598 bool get_display_finished() const { return x_display_finished; };
599 const infinint & get_pause() const { return x_pause; };
600 bool get_empty_dir() const { return x_empty_dir; };
601 compression get_compression() const { return x_compr_algo; };
602 U_I get_compression_level() const { return x_compression_level; };
603 U_I get_compression_block_size() const { return x_compression_block_size; };
604 const infinint & get_slice_size() const { return x_file_size; };
605 const infinint & get_first_slice_size() const { return x_first_file_size; };
606 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
607 const std::string & get_execute() const { return x_execute; };
608 crypto_algo get_crypto_algo() const { return x_crypto; };
609 const secu_string & get_crypto_pass() const { return x_pass; };
610 U_32 get_crypto_size() const { return x_crypto_size; };
611 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
612 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
613 const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
614 const infinint & get_min_compr_size() const { return x_min_compr_size; };
615 bool get_nodump() const { return x_nodump; };
616 const std::string & get_exclude_by_ea() const { return exclude_by_ea; };
617 comparison_fields get_comparison_fields() const { return x_what_to_check; };
618 const infinint & get_hourshift() const { return x_hourshift; };
619 bool get_empty() const { return x_empty; };
620 bool get_alter_atime() const { return x_alter_atime; };
621 bool get_furtive_read_mode() const { return x_furtive_read; };
622 bool get_same_fs() const { return x_same_fs; };
623 std::deque<std::string> get_same_fs_include() const { return x_same_fs_include; };
624 std::deque<std::string> get_same_fs_exclude() const { return x_same_fs_exclude; };
625 bool get_snapshot() const { return x_snapshot; };
626 bool get_cache_directory_tagging() const { return x_cache_directory_tagging; };
627 const infinint & get_fixed_date() const { return x_fixed_date; };
628 const std::string & get_slice_permission() const { return x_slice_permission; };
629 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
630 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
631 const infinint & get_repeat_count() const { return x_repeat_count; };
632 const infinint & get_repeat_byte() const { return x_repeat_byte; };
633 bool get_sequential_marks() const { return x_sequential_marks; };
634 infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
635 bool get_security_check() const { return x_security_check; };
636 const std::string & get_user_comment() const { return x_user_comment; };
637 hash_algo get_hash_algo() const { return x_hash; };
638 infinint get_slice_min_digits() const { return x_slice_min_digits; };
639 const std::string & get_backup_hook_file_execute() const { return x_backup_hook_file_execute; };
640 const mask & get_backup_hook_file_mask() const { return *x_backup_hook_file_mask; };
641 bool get_ignore_unknown_inode_type() const { return x_ignore_unknown; };
642 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
643 const fsa_scope & get_fsa_scope() const { return x_scope; };
644 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
645 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
646 bool get_delta_diff() const { return x_delta_diff; };
647 bool get_delta_signature() const { return x_delta_signature; };
648 const mask & get_delta_mask() const { return *x_delta_mask; }
649 bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
650 const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
651 bool get_auto_zeroing_neg_dates() const { return x_auto_zeroing_neg_dates; };
652 const std::set<std::string> & get_ignored_as_symlink() const { return x_ignored_as_symlink; };
653 modified_data_detection get_modified_data_detection() const { return x_modified_data_detection; };
654 const infinint & get_iteration_count() const { return x_iteration_count; };
655 hash_algo get_kdf_hash() const { return x_kdf_hash; };
656 delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
657
658 private:
659 std::shared_ptr<archive> x_ref_arch;
660 mask * x_selection;
661 mask * x_subtree;
662 bool x_allow_over;
663 bool x_warn_over;
664 bool x_info_details;
665 bool x_display_treated;
666 bool x_display_treated_only_dir;
667 bool x_display_skipped;
668 bool x_display_finished;
669 infinint x_pause;
670 bool x_empty_dir;
671 compression x_compr_algo;
672 U_I x_compression_level;
673 U_I x_compression_block_size;
674 infinint x_file_size;
675 infinint x_first_file_size;
676 mask * x_ea_mask;
677 std::string x_execute;
678 crypto_algo x_crypto;
679 secu_string x_pass;
680 U_32 x_crypto_size;
681 std::vector<std::string> x_gnupg_recipients;
682 std::vector<std::string> x_gnupg_signatories;
683 mask * x_compr_mask;
684 infinint x_min_compr_size;
685 bool x_nodump;
686 std::string exclude_by_ea;
687 comparison_fields x_what_to_check;
688 infinint x_hourshift;
689 bool x_empty;
690 bool x_alter_atime;
691 bool x_old_alter_atime;
692 bool x_furtive_read;
693 bool x_same_fs;
694 std::deque<std::string> x_same_fs_include;
695 std::deque<std::string> x_same_fs_exclude;
696 bool x_snapshot;
697 bool x_cache_directory_tagging;
698 infinint x_fixed_date;
699 std::string x_slice_permission;
700 std::string x_slice_user_ownership;
701 std::string x_slice_group_ownership;
702 infinint x_repeat_count;
703 infinint x_repeat_byte;
704 bool x_sequential_marks;
705 infinint x_sparse_file_min_size;
706 bool x_security_check;
707 std::string x_user_comment;
708 hash_algo x_hash;
709 infinint x_slice_min_digits;
710 mask * x_backup_hook_file_mask;
711 std::string x_backup_hook_file_execute;
712 bool x_ignore_unknown;
713 std::shared_ptr<entrepot> x_entrepot;
714 fsa_scope x_scope;
715 U_I x_multi_threaded_crypto;
716 U_I x_multi_threaded_compress;
717 bool x_delta_diff;
718 bool x_delta_signature;
719 mask *x_delta_mask;
720 bool has_delta_mask_been_set;
721 infinint x_delta_sig_min_size;
722 bool x_auto_zeroing_neg_dates;
723 std::set<std::string> x_ignored_as_symlink;
724 modified_data_detection x_modified_data_detection;
725 infinint x_iteration_count;
726 hash_algo x_kdf_hash;
727 delta_sig_block_size x_sig_block_len;
728
729 void nullifyptr() noexcept;
730 void destroy() noexcept;
731 void copy_from(const archive_options_create & ref);
732 void move_from(archive_options_create && ref) noexcept;
733 void destroy_mask(mask * & ptr);
734 void clean_mask(mask * & ptr);
735 void check_mask(const mask & m);
736 };
737
738
739
740
741
742
746
748
749 class archive_options_isolate
750 {
751 public:
752 archive_options_isolate();
753 archive_options_isolate(const archive_options_isolate & ref);
754 archive_options_isolate(archive_options_isolate && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
755 archive_options_isolate & operator = (const archive_options_isolate & ref) { destroy(); copy_from(ref); return *this; };
756 archive_options_isolate & operator = (archive_options_isolate && ref) noexcept { move_from(std::move(ref)); return *this; };
757 ~archive_options_isolate() { destroy(); };
758
759
760 void clear();
761
763 // setting methods
764
766 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
767
769 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
770
772 void set_info_details(bool info_details) { x_info_details = info_details; };
773
775 void set_pause(const infinint & pause) { x_pause = pause; };
776
778 void set_compression(compression algo) { x_algo = algo; };
779
781 void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
782
784
785 void set_compression_block_size(U_I compression_block_size) { x_compression_block_size = compression_block_size; };
786
788
792 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
793 {
794 x_file_size = file_size;
795 if(first_file_size.is_zero())
796 x_first_file_size = file_size;
797 else
798 x_first_file_size = first_file_size;
799 };
800
802
812 void set_execute(const std::string & execute) { x_execute = execute; };
813
815 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
816
818 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
819
821 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
822
827 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
828
832 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
833
835 void set_empty(bool empty) { x_empty = empty; };
836
838 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
839
841 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
842
844 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
845
847 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
848
850 void set_hash_algo(hash_algo hash);
851
853 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
854
856 void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
857
859 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; };
860
862
865 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
866
868 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
869
871 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
872
873
875 void set_delta_signature(bool val) { x_delta_signature = val; };
876
878 void set_delta_mask(const mask & delta_mask);
879
883 void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
884
886 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
887
889 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
890
892 void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
893
895 // getting methods
896
897 bool get_allow_over() const { return x_allow_over; };
898 bool get_warn_over() const { return x_warn_over; };
899 bool get_info_details() const { return x_info_details; };
900 const infinint & get_pause() const { return x_pause; };
901 compression get_compression() const { return x_algo; };
902 U_I get_compression_level() const { return x_compression_level; };
903 U_I get_compression_block_size() const { return x_compression_block_size; };
904 const infinint & get_slice_size() const { return x_file_size; };
905 const infinint & get_first_slice_size() const { return x_first_file_size; };
906 const std::string & get_execute() const { return x_execute; };
907 crypto_algo get_crypto_algo() const { return x_crypto; };
908 const secu_string & get_crypto_pass() const { return x_pass; };
909 U_32 get_crypto_size() const { return x_crypto_size; };
910 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
911 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
912 bool get_empty() const { return x_empty; };
913 const std::string & get_slice_permission() const { return x_slice_permission; };
914 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
915 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
916 const std::string & get_user_comment() const { return x_user_comment; };
917 hash_algo get_hash_algo() const { return x_hash; };
918 infinint get_slice_min_digits() const { return x_slice_min_digits; };
919 bool get_sequential_marks() const { return x_sequential_marks; };
920 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
921 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
922 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
923 bool get_delta_signature() const { return x_delta_signature; };
924 const mask & get_delta_mask() const { return *x_delta_mask; }
925 bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
926 const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
927 const infinint & get_iteration_count() const { return x_iteration_count; };
928 hash_algo get_kdf_hash() const { return x_kdf_hash; };
929 delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
930
931
932 private:
933 bool x_allow_over;
934 bool x_warn_over;
935 bool x_info_details;
936 infinint x_pause;
937 compression x_algo;
938 U_I x_compression_level;
939 U_I x_compression_block_size;
940 infinint x_file_size;
941 infinint x_first_file_size;
942 std::string x_execute;
943 crypto_algo x_crypto;
944 secu_string x_pass;
945 U_32 x_crypto_size;
946 std::vector<std::string> x_gnupg_recipients;
947 std::vector<std::string> x_gnupg_signatories;
948 bool x_empty;
949 std::string x_slice_permission;
950 std::string x_slice_user_ownership;
951 std::string x_slice_group_ownership;
952 std::string x_user_comment;
953 hash_algo x_hash;
954 infinint x_slice_min_digits;
955 bool x_sequential_marks;
956 std::shared_ptr<entrepot> x_entrepot;
957 U_I x_multi_threaded_crypto;
958 U_I x_multi_threaded_compress;
959 bool x_delta_signature;
960 mask *x_delta_mask;
961 bool has_delta_mask_been_set;
962 infinint x_delta_sig_min_size;
963 infinint x_iteration_count;
964 hash_algo x_kdf_hash;
965 delta_sig_block_size x_sig_block_len;
966
967 void copy_from(const archive_options_isolate & ref);
968 void move_from(archive_options_isolate && ref) noexcept;
969 void destroy() noexcept;
970 void nullifyptr() noexcept;
971 };
972
973
974
978
980 class archive_options_merge
981 {
982 public:
983
984 archive_options_merge() { nullifyptr(); clear(); };
985 archive_options_merge(const archive_options_merge & ref) { copy_from(ref); };
986 archive_options_merge(archive_options_merge && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
987 archive_options_merge & operator = (const archive_options_merge & ref) { destroy(); copy_from(ref); return *this; };
988 archive_options_merge & operator = (archive_options_merge && ref) noexcept { move_from(std::move(ref)); return *this; };
989 ~archive_options_merge() { destroy(); };
990
991 void clear();
992
994 // setting methods
995
996 void set_auxiliary_ref(std::shared_ptr<archive> ref) { x_ref = ref; };
997
999 void set_selection(const mask & selection);
1000
1002 void set_subtree(const mask & subtree);
1003
1005 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
1006
1008 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1009
1011 void set_overwriting_rules(const crit_action & overwrite);
1012
1014
1019 void set_info_details(bool info_details) { x_info_details = info_details; };
1020
1022
1025 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1026
1028 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1029
1031 void set_pause(const infinint & pause) { x_pause = pause; };
1032
1034 void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
1035
1037 void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
1038
1040 void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
1041
1043 void set_compression_block_size(U_I compression_block_size) { x_compression_block_size = compression_block_size; };
1044
1046
1050 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
1051 {
1052 x_file_size = file_size;
1053 if(first_file_size.is_zero())
1054 x_first_file_size = file_size;
1055 else
1056 x_first_file_size = first_file_size;
1057 };
1058
1060 void set_ea_mask(const mask & ea_mask);
1061
1063
1073 void set_execute(const std::string & execute) { x_execute = execute; };
1074
1076 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
1077
1080 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
1081
1083 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1084
1089 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1090
1094 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1095
1097 void set_compr_mask(const mask & compr_mask);
1098
1100 void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
1101
1103 void set_empty(bool empty) { x_empty = empty; };
1104
1106 void set_keep_compressed(bool keep_compressed) { x_keep_compressed = keep_compressed; };
1107
1109 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1110
1112 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1113
1115 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1116
1118 void set_decremental_mode(bool mode) { x_decremental = mode; };
1119
1121 void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
1122
1124 void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
1125
1127 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1128
1130 void set_hash_algo(hash_algo hash);
1131
1133 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1134
1136 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; };
1137
1139 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1140
1142
1145 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
1146
1148 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
1149
1151 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
1152
1158 void set_delta_signature(bool val) { x_delta_signature = val; };
1159
1161 void set_delta_mask(const mask & delta_mask);
1162
1164
1166 void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
1167
1169 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
1170
1172 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
1173
1175 void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
1176
1177
1179 // getting methods
1180
1181 std::shared_ptr<archive> get_auxiliary_ref() const { return x_ref; };
1182 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1183 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1184 bool get_allow_over() const { return x_allow_over; };
1185 bool get_warn_over() const { return x_warn_over; };
1186 const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1187 bool get_info_details() const { return x_info_details; };
1188 bool get_display_treated() const { return x_display_treated; };
1189 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1190 bool get_display_skipped() const { return x_display_skipped; };
1191 const infinint & get_pause() const { return x_pause; };
1192 bool get_empty_dir() const { return x_empty_dir; };
1193 compression get_compression() const { return x_compr_algo; };
1194 U_I get_compression_level() const { return x_compression_level; };
1195 U_I get_compression_block_size() const { return x_compression_block_size; };
1196 const infinint & get_slice_size() const { return x_file_size; };
1197 const infinint & get_first_slice_size() const { return x_first_file_size; };
1198 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1199 const std::string & get_execute() const { return x_execute; };
1200 crypto_algo get_crypto_algo() const { return x_crypto; };
1201 const secu_string & get_crypto_pass() const { return x_pass; };
1202 U_32 get_crypto_size() const { return x_crypto_size; };
1203 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1204 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1205 const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
1206 const infinint & get_min_compr_size() const { return x_min_compr_size; };
1207 bool get_empty() const { return x_empty; };
1208 bool get_keep_compressed() const { return x_keep_compressed; };
1209 const std::string & get_slice_permission() const { return x_slice_permission; };
1210 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1211 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1212 bool get_decremental_mode() const { return x_decremental; };
1213 bool get_sequential_marks() const { return x_sequential_marks; };
1214 infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
1215 const std::string & get_user_comment() const { return x_user_comment; };
1216 hash_algo get_hash_algo() const { return x_hash; };
1217 infinint get_slice_min_digits() const { return x_slice_min_digits; };
1218 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1219 const fsa_scope & get_fsa_scope() const { return x_scope; };
1220 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
1221 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
1222 bool get_delta_signature() const { return x_delta_signature; };
1223 const mask & get_delta_mask() const { return *x_delta_mask; }
1224 bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
1225 const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
1226 const infinint & get_iteration_count() const { return x_iteration_count; };
1227 hash_algo get_kdf_hash() const { return x_kdf_hash; };
1228 delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
1229
1230
1231 private:
1232 std::shared_ptr<archive> x_ref;
1233 mask * x_selection;
1234 mask * x_subtree;
1235 bool x_allow_over;
1236 bool x_warn_over;
1237 crit_action * x_overwrite;
1238 bool x_info_details;
1239 bool x_display_treated;
1240 bool x_display_treated_only_dir;
1241 bool x_display_skipped;
1242 infinint x_pause;
1243 bool x_empty_dir;
1244 compression x_compr_algo;
1245 U_I x_compression_level;
1246 U_I x_compression_block_size;
1247 infinint x_file_size;
1248 infinint x_first_file_size;
1249 mask * x_ea_mask;
1250 std::string x_execute;
1251 crypto_algo x_crypto;
1252 secu_string x_pass;
1253 U_32 x_crypto_size;
1254 std::vector<std::string> x_gnupg_recipients;
1255 std::vector<std::string> x_gnupg_signatories;
1256 mask * x_compr_mask;
1257 infinint x_min_compr_size;
1258 bool x_empty;
1259 bool x_keep_compressed;
1260 std::string x_slice_permission;
1261 std::string x_slice_user_ownership;
1262 std::string x_slice_group_ownership;
1263 bool x_decremental;
1264 bool x_sequential_marks;
1265 infinint x_sparse_file_min_size;
1266 std::string x_user_comment;
1267 hash_algo x_hash;
1268 infinint x_slice_min_digits;
1269 std::shared_ptr<entrepot> x_entrepot;
1270 fsa_scope x_scope;
1271 U_I x_multi_threaded_crypto;
1272 U_I x_multi_threaded_compress;
1273 bool x_delta_signature;
1274 mask *x_delta_mask;
1275 bool has_delta_mask_been_set;
1276 infinint x_delta_sig_min_size;
1277 infinint x_iteration_count;
1278 hash_algo x_kdf_hash;
1279 delta_sig_block_size x_sig_block_len;
1280
1281 void destroy() noexcept;
1282 void copy_from(const archive_options_merge & ref);
1283 void move_from(archive_options_merge && ref) noexcept;
1284 void nullifyptr() noexcept;
1285 };
1286
1287
1291
1293 class archive_options_extract
1294 {
1295 public:
1296 enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1297
1298 archive_options_extract() { nullifyptr(); clear(); };
1299 archive_options_extract(const archive_options_extract & ref) { copy_from(ref); };
1300 archive_options_extract(archive_options_extract && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1301 archive_options_extract & operator = (const archive_options_extract & ref) { destroy(); copy_from(ref); return *this; };
1302 archive_options_extract & operator = (archive_options_extract && ref) noexcept { move_from(std::move(ref)); return *this; };
1303 ~archive_options_extract() { destroy(); };
1304
1305 void clear();
1306
1308 // setting methods
1309
1311 void set_selection(const mask & selection);
1312
1314 void set_subtree(const mask & subtree);
1315
1317 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1318
1325 void set_info_details(bool info_details) { x_info_details = info_details; };
1326
1330 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1331
1333 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1334
1336 void set_ea_mask(const mask & ea_mask);
1337
1339 void set_flat(bool flat) { x_flat = flat; };
1340
1342 void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1343
1345 void set_warn_remove_no_match(bool warn_remove_no_match) { x_warn_remove_no_match = warn_remove_no_match; };
1346
1348 void set_empty(bool empty) { x_empty = empty; };
1349
1351 void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
1352
1354
1357 void set_dirty_behavior(bool ignore, bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1358
1360 void set_dirty_behavior(t_dirty val) { x_dirty = val; };
1361
1363 void set_overwriting_rules(const crit_action & over);
1364
1366
1368 void set_only_deleted(bool val) { x_only_deleted = val; };
1369
1370
1372
1374 void set_ignore_deleted(bool val) { x_ignore_deleted = val; };
1375
1377 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1378
1380 void set_ignore_unix_sockets(bool val) { x_ignore_unix_sockets = val; };
1381
1383 void set_in_place(bool arg) { x_in_place = arg; };
1384
1385
1387 // getting methods
1388
1389 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1390 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1391 bool get_warn_over() const { return x_warn_over; };
1392 bool get_info_details() const { return x_info_details; };
1393 bool get_display_treated() const { return x_display_treated; };
1394 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1395 bool get_display_skipped() const { return x_display_skipped; };
1396 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1397 bool get_flat() const { return x_flat; };
1398 comparison_fields get_what_to_check() const { return x_what_to_check; };
1399 bool get_warn_remove_no_match() const { return x_warn_remove_no_match; };
1400 bool get_empty() const { return x_empty; };
1401 bool get_empty_dir() const { return x_empty_dir; };
1402 t_dirty get_dirty_behavior() const { return x_dirty; }
1403 const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1404 bool get_only_deleted() const { return x_only_deleted; };
1405 bool get_ignore_deleted() const { return x_ignore_deleted; };
1406 const fsa_scope & get_fsa_scope() const { return x_scope; };
1407 bool get_ignore_unix_sockets() const { return x_ignore_unix_sockets; };
1408 bool get_in_place() const { return x_in_place; };
1409
1410 private:
1411 mask * x_selection;
1412 mask * x_subtree;
1413 bool x_warn_over;
1414 bool x_info_details;
1415 bool x_display_treated;
1416 bool x_display_treated_only_dir;
1417 bool x_display_skipped;
1418 mask * x_ea_mask;
1419 bool x_flat;
1420 comparison_fields x_what_to_check;
1421 bool x_warn_remove_no_match;
1422 bool x_empty;
1423 bool x_empty_dir;
1424 t_dirty x_dirty;
1425 crit_action *x_overwrite;
1426 bool x_only_deleted;
1427 bool x_ignore_deleted;
1428 fsa_scope x_scope;
1429 bool x_ignore_unix_sockets;
1430 bool x_in_place;
1431
1432 void destroy() noexcept;
1433 void nullifyptr() noexcept;
1434 void copy_from(const archive_options_extract & ref);
1435 void move_from(archive_options_extract && ref) noexcept;
1436 };
1437
1438
1439
1440
1444
1446 class archive_options_listing
1447 {
1448 public:
1449 archive_options_listing() { nullifyptr(); clear(); };
1450 archive_options_listing(const archive_options_listing & ref) { copy_from(ref); };
1451 archive_options_listing(archive_options_listing && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1452 archive_options_listing & operator = (const archive_options_listing & ref) { destroy(); copy_from(ref); return *this; };
1453 archive_options_listing & operator = (archive_options_listing && ref) noexcept { move_from(std::move(ref)); return *this; };
1454 virtual ~archive_options_listing() { destroy(); };
1455
1456 virtual void clear();
1457
1458
1460 // setting methods
1461
1463 void set_info_details(bool info_details) { x_info_details = info_details; };
1464
1466
1468 void set_selection(const mask & selection);
1469
1471
1473 void set_subtree(const mask & subtree);
1474
1476 void set_filter_unsaved(bool filter_unsaved) { x_filter_unsaved = filter_unsaved; };
1477
1479 void set_slicing_location(bool val) { x_slicing_location = val; };
1480
1482
1486 void set_user_slicing(const infinint & slicing_first, const infinint & slicing_others);
1487
1489
1491 void set_display_ea(bool display_ea) { x_display_ea = display_ea; };
1492
1493
1495 // getting methods
1496
1497 bool get_info_details() const { return x_info_details; };
1498 const mask & get_selection() const;
1499 const mask & get_subtree() const;
1500 bool get_filter_unsaved() const { return x_filter_unsaved; };
1501 bool get_user_slicing(infinint & slicing_first, infinint & slicing_others) const;
1502 bool get_slicing_location() const { return x_slicing_location; };
1503 bool get_display_ea() const { return x_display_ea; };
1504
1505 private:
1506 bool x_info_details;
1507 mask * x_selection;
1508 mask * x_subtree;
1509 bool x_filter_unsaved;
1510 infinint *x_slicing_first;
1511 infinint *x_slicing_others;
1512 bool x_slicing_location;
1513 bool x_display_ea;
1514
1515 void destroy() noexcept;
1516 void nullifyptr() noexcept;
1517 void copy_from(const archive_options_listing & ref);
1518 void move_from(archive_options_listing && ref) noexcept;
1519 };
1520
1524
1525
1526 class archive_options_diff
1527 {
1528 public:
1529 archive_options_diff() { nullifyptr(); clear(); };
1530 archive_options_diff(const archive_options_diff & ref) { copy_from(ref); };
1531 archive_options_diff(archive_options_diff && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1532 archive_options_diff & operator = (const archive_options_diff & ref) { destroy(); copy_from(ref); return *this; };
1533 archive_options_diff & operator = (archive_options_diff && ref) noexcept { move_from(std::move(ref)); return *this; };
1534 ~archive_options_diff() { destroy(); };
1535
1536 void clear();
1537
1539 // setting methods
1540
1542 void set_selection(const mask & selection);
1543
1545 void set_subtree(const mask & subtree);
1546
1553 void set_info_details(bool info_details) { x_info_details = info_details; };
1554
1558 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1559
1561 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1562
1564 void set_ea_mask(const mask & ea_mask);
1565
1567 void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1568
1570
1573 void set_alter_atime(bool alter_atime)
1574 {
1575 if(x_furtive_read)
1576 x_old_alter_atime = alter_atime;
1577 else
1578 x_alter_atime = alter_atime;
1579 };
1580
1582 void set_furtive_read_mode(bool furtive_read);
1583
1585 void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
1586
1588 void set_compare_symlink_date(bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1589
1591 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1592
1594 void set_in_place(bool arg) { x_in_place = arg; };
1595
1596
1598 // getting methods
1599
1600 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1601 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1602 bool get_info_details() const { return x_info_details; };
1603 bool get_display_treated() const { return x_display_treated; };
1604 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1605 bool get_display_skipped() const { return x_display_skipped; };
1606 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1607 comparison_fields get_what_to_check() const { return x_what_to_check; };
1608 bool get_alter_atime() const { return x_alter_atime; };
1609 bool get_furtive_read_mode() const { return x_furtive_read; };
1610 const infinint & get_hourshift() const { return x_hourshift; };
1611 bool get_compare_symlink_date() const { return x_compare_symlink_date; };
1612 const fsa_scope & get_fsa_scope() const { return x_scope; };
1613 bool get_in_place() const { return x_in_place; };
1614
1615 private:
1616 mask * x_selection;
1617 mask * x_subtree;
1618 bool x_info_details;
1619 bool x_display_treated;
1620 bool x_display_treated_only_dir;
1621 bool x_display_skipped;
1622 mask * x_ea_mask;
1623 comparison_fields x_what_to_check;
1624 bool x_alter_atime;
1625 bool x_old_alter_atime;
1626 bool x_furtive_read;
1627 infinint x_hourshift;
1628 bool x_compare_symlink_date;
1629 fsa_scope x_scope;
1630 bool x_in_place;
1631
1632 void destroy() noexcept;
1633 void nullifyptr() noexcept;
1634 void copy_from(const archive_options_diff & ref);
1635 void move_from(archive_options_diff && ref) noexcept;
1636 };
1637
1638
1639
1640
1644
1646 class archive_options_test
1647 {
1648 public:
1649 archive_options_test() { nullifyptr(); clear(); };
1650 archive_options_test(const archive_options_test & ref) { copy_from(ref); };
1651 archive_options_test(archive_options_test && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1652 archive_options_test & operator = (const archive_options_test & ref) { destroy(); copy_from(ref); return *this; };
1653 archive_options_test & operator = (archive_options_test && ref) noexcept { move_from(std::move(ref)); return *this; };
1654 ~archive_options_test() { destroy(); };
1655
1656 void clear();
1657
1659 // setting methods
1660
1662 void set_selection(const mask & selection);
1663
1665 void set_subtree(const mask & subtree);
1666
1673 void set_info_details(bool info_details) { x_info_details = info_details; };
1674
1676 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1677
1681 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1682
1684 void set_empty(bool empty) { x_empty = empty; };
1685
1686
1688 // getting methods
1689
1690 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1691 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1692 bool get_info_details() const { return x_info_details; };
1693 bool get_display_treated() const { return x_display_treated; };
1694 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1695 bool get_display_skipped() const { return x_display_skipped; };
1696 bool get_empty() const { return x_empty; };
1697
1698 private:
1699 mask * x_selection;
1700 mask * x_subtree;
1701 bool x_info_details;
1702 bool x_display_treated;
1703 bool x_display_treated_only_dir;
1704 bool x_display_skipped;
1705 bool x_empty;
1706
1707 void destroy() noexcept;
1708 void nullifyptr() noexcept;
1709 void copy_from(const archive_options_test & ref);
1710 void move_from(archive_options_test && ref) noexcept;
1711 };
1712
1713
1717
1719 class archive_options_repair
1720 {
1721 public:
1722 // default constructors and destructor.
1723
1724 archive_options_repair();
1725 archive_options_repair(const archive_options_repair & ref);
1726 archive_options_repair(archive_options_repair && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1727 archive_options_repair & operator = (const archive_options_repair & ref) { copy_from(ref); return *this; };
1728 archive_options_repair & operator = (archive_options_repair && ref) noexcept { move_from(std::move(ref)); return *this; };
1729 ~archive_options_repair() = default;
1730
1732 // set back to default (this is the state just after the object is constructed
1733 // this method is to be used to reuse a given object
1734
1736 void clear();
1737
1738
1740 // setting methods
1741
1743 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
1744
1746 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1747
1754 void set_info_details(bool info_details) { x_info_details = info_details; };
1755
1760 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1761
1763 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1764
1766 void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
1767
1769 void set_pause(const infinint & pause) { x_pause = pause; };
1770
1772
1776 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
1777 {
1778 x_file_size = file_size;
1779 if(first_file_size.is_zero())
1780 x_first_file_size = file_size;
1781 else
1782 x_first_file_size = first_file_size;
1783 };
1784
1786
1796 void set_execute(const std::string & execute) { x_execute = execute; };
1797
1799 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
1800
1803 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
1804
1806 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1807
1816 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1817
1821 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1822
1824 void set_empty(bool empty) { x_empty = empty; };
1825
1827 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1828
1830 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1831
1833 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1834
1836 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1837
1841 void set_hash_algo(hash_algo hash);
1842
1844 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1845
1847 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; };
1848
1850
1853 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
1854
1856 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
1857
1859 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
1860
1861
1863 // getting methods
1864
1865 bool get_allow_over() const { return x_allow_over; };
1866 bool get_warn_over() const { return x_warn_over; };
1867 bool get_info_details() const { return x_info_details; };
1868 bool get_display_treated() const { return x_display_treated; };
1869 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1870 bool get_display_skipped() const { return x_display_skipped; };
1871 bool get_display_finished() const { return x_display_finished; };
1872 const infinint & get_pause() const { return x_pause; };
1873 const infinint & get_slice_size() const { return x_file_size; };
1874 const infinint & get_first_slice_size() const { return x_first_file_size; };
1875 const std::string & get_execute() const { return x_execute; };
1876 crypto_algo get_crypto_algo() const { return x_crypto; };
1877 const secu_string & get_crypto_pass() const { return x_pass; };
1878 U_32 get_crypto_size() const { return x_crypto_size; };
1879 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1880 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1881 bool get_empty() const { return x_empty; };
1882 const std::string & get_slice_permission() const { return x_slice_permission; };
1883 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1884 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1885 const std::string & get_user_comment() const { return x_user_comment; };
1886 hash_algo get_hash_algo() const { return x_hash; };
1887 infinint get_slice_min_digits() const { return x_slice_min_digits; };
1888 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1889 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
1890 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
1891
1892 private:
1893 bool x_allow_over;
1894 bool x_warn_over;
1895 bool x_info_details;
1896 bool x_display_treated;
1897 bool x_display_treated_only_dir;
1898 bool x_display_skipped;
1899 bool x_display_finished;
1900 infinint x_pause;
1901 infinint x_file_size;
1902 infinint x_first_file_size;
1903 std::string x_execute;
1904 crypto_algo x_crypto;
1905 secu_string x_pass;
1906 U_32 x_crypto_size;
1907 std::vector<std::string> x_gnupg_recipients;
1908 std::vector<std::string> x_gnupg_signatories;
1909 bool x_empty;
1910 std::string x_slice_permission;
1911 std::string x_slice_user_ownership;
1912 std::string x_slice_group_ownership;
1913 std::string x_user_comment;
1914 hash_algo x_hash;
1915 infinint x_slice_min_digits;
1916 std::shared_ptr<entrepot> x_entrepot;
1917 U_I x_multi_threaded_crypto;
1918 U_I x_multi_threaded_compress;
1919
1920 void nullifyptr() noexcept {};
1921 void copy_from(const archive_options_repair & ref);
1922 void move_from(archive_options_repair && ref) noexcept;
1923 };
1924
1926
1927} // end of namespace
1928
1929#endif
archive_aux.hpp
set of datastructures used to interact with a catalogue object
libdar::Ecompilation
exception used when a requested fearture has not beed activated at compilation time
Definition: erreurs.hpp:366
libdar::Erange
exception used to signal range error
Definition: erreurs.hpp:220
libdar::archive_options_create
class holding optional parameters used to create an archive
Definition: archive_options.hpp:288
libdar::archive_options_create::clear
void clear()
reset all the options to their default values
libdar::archive_options_create::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:374
libdar::archive_options_create::set_delta_sig_min_size
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...
Definition: archive_options.hpp:561
libdar::archive_options_create::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition: archive_options.hpp:405
libdar::archive_options_create::set_compression_block_size
void set_compression_block_size(U_I compression_block_size)
set the compression block size
Definition: archive_options.hpp:367
libdar::archive_options_create::set_auto_zeroing_neg_dates
void set_auto_zeroing_neg_dates(bool val)
whether to automatically zeroing negative dates read from the filesystem (just warn,...
Definition: archive_options.hpp:564
libdar::archive_options_create::set_same_fs_include
void set_same_fs_include(const std::string &included_path_to_fs)
files on the filesystem pointed to by the given path will be considered for the backup operation if n...
Definition: archive_options.hpp:474
libdar::archive_options_create::set_display_finished
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio
Definition: archive_options.hpp:343
libdar::archive_options_create::set_allow_over
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
Definition: archive_options.hpp:320
libdar::archive_options_create::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition: archive_options.hpp:401
libdar::archive_options_create::set_backup_hook
void set_backup_hook(const std::string &execute, const mask &which_files)
defines the backup hook for files
libdar::archive_options_create::set_compression_level
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
Definition: archive_options.hpp:355
libdar::archive_options_create::set_retry_on_change
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
Definition: archive_options.hpp:500
libdar::archive_options_create::set_info_details
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
Definition: archive_options.hpp:331
libdar::archive_options_create::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:323
libdar::archive_options_create::set_execute
void set_execute(const std::string &execute)
set the command to execute after each slice creation
Definition: archive_options.hpp:398
libdar::archive_options_create::set_security_check
void set_security_check(bool check)
whether to check for ctime changes since with the archive of reference
Definition: archive_options.hpp:509
libdar::archive_options_create::set_min_compr_size
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
Definition: archive_options.hpp:431
libdar::archive_options_create::set_fixed_date
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 ...
Definition: archive_options.hpp:488
libdar::archive_options_create::set_delta_signature
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
Definition: archive_options.hpp:553
libdar::archive_options_create::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:491
libdar::archive_options_create::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition: archive_options.hpp:425
libdar::archive_options_create::set_subtree
void set_subtree(const mask &subtree)
defines the directory and files to consider (this mask will be applied to the absolute path of files ...
libdar::archive_options_create::set_modified_data_detection
void set_modified_data_detection(modified_data_detection val)
defines when to resave a file's data which inode metadata changed
Definition: archive_options.hpp:574
libdar::archive_options_create::set_furtive_read_mode
void set_furtive_read_mode(bool furtive_read)
whether to use furtive read mode (if activated, alter_atime() has no meaning/use)
libdar::archive_options_create::set_sequential_marks
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive
Definition: archive_options.hpp:503
libdar::archive_options_create::x_ref_arch
std::shared_ptr< archive > x_ref_arch
just contains the address of an existing object, no local copy of object is done here
Definition: archive_options.hpp:656
libdar::archive_options_create::set_multi_threaded_compress
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
Definition: archive_options.hpp:545
libdar::archive_options_create::set_cache_directory_tagging
void set_cache_directory_tagging(bool cache_directory_tagging)
whether to consider the Cache Directory Tagging Standard
Definition: archive_options.hpp:485
libdar::archive_options_create::set_compr_mask
void set_compr_mask(const mask &compr_mask)
defines files to compress
libdar::archive_options_create::set_pause
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...
Definition: archive_options.hpp:346
libdar::archive_options_create::x_ea_mask
mask * x_ea_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
Definition: archive_options.hpp:676
libdar::archive_options_create::set_slice_min_digits
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...
Definition: archive_options.hpp:521
libdar::archive_options_create::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
Definition: archive_options.hpp:539
libdar::archive_options_create::set_same_fs
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...
Definition: archive_options.hpp:469
libdar::archive_options_create::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition: archive_options.hpp:577
libdar::archive_options_create::set_empty_dir
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
Definition: archive_options.hpp:349
libdar::archive_options_create::set_delta_mask
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
libdar::archive_options_create::set_sparse_file_min_size
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
Definition: archive_options.hpp:506
libdar::archive_options_create::x_subtree
mask * x_subtree
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
Definition: archive_options.hpp:661
libdar::archive_options_create::set_delta_diff
void set_delta_diff(bool val)
whether binary delta has to be computed for differential/incremental backup
Definition: archive_options.hpp:550
libdar::archive_options_create::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:340
libdar::archive_options_create::set_hourshift
void set_hourshift(const infinint &hourshift)
ignore differences of at most this integer number of hours while looking for changes in dates
Definition: archive_options.hpp:445
libdar::archive_options_create::x_selection
mask * x_selection
points to a local copy of mask (must be allocated / releases by the archive_option_create object)
Definition: archive_options.hpp:660
libdar::archive_options_create::set_crypto_size
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
Definition: archive_options.hpp:408
libdar::archive_options_create::set_ea_mask
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to save
libdar::archive_options_create::set_fsa_scope
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
Definition: archive_options.hpp:533
libdar::archive_options_create::set_nodump
void set_nodump(bool nodump)
defines whether to ignore files with the nodump flag set
Definition: archive_options.hpp:434
libdar::archive_options_create::set_same_fs_exclude
void set_same_fs_exclude(const std::string &excluded_path_to_fs)
files on the filesystem pointed to by the given path will not be considered for backup operation
Definition: archive_options.hpp:479
libdar::archive_options_create::set_ignored_as_symlink
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
Definition: archive_options.hpp:570
libdar::archive_options_create::set_exclude_by_ea
void set_exclude_by_ea(const std::string &ea_name)
Definition: archive_options.hpp:438
libdar::archive_options_create::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:530
libdar::archive_options_create::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:494
libdar::archive_options_create::set_compression
void set_compression(compression compr_algo)
set the compression algorithm to be used
Definition: archive_options.hpp:352
libdar::archive_options_create::x_compr_mask
mask * x_compr_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
Definition: archive_options.hpp:683
libdar::archive_options_create::set_ignore_unknown_inode_type
void set_ignore_unknown_inode_type(bool val)
whether to ignore unknown inode types instead of issuing a warning
Definition: archive_options.hpp:527
libdar::archive_options_create::set_snapshot
void set_snapshot(bool snapshot)
whether to make an emtpy archive only referencing the current state of files in the filesystem
Definition: archive_options.hpp:482
libdar::archive_options_create::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:497
libdar::archive_options_create::set_reference
void set_reference(std::shared_ptr< archive > ref_arch)
set the archive to take as reference (nullptr for a full backup)
Definition: archive_options.hpp:311
libdar::archive_options_create::set_alter_atime
void set_alter_atime(bool alter_atime)
whether to alter atime or ctime in the filesystem when reading files to save
Definition: archive_options.hpp:454
libdar::archive_options_create::x_old_alter_atime
bool x_old_alter_atime
used to backup origina alter_atime value when activating furtive read mode
Definition: archive_options.hpp:691
libdar::archive_options_create::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition: archive_options.hpp:580
libdar::archive_options_create::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:512
libdar::archive_options_create::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
Definition: archive_options.hpp:337
libdar::archive_options_create::set_hash_algo
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
libdar::archive_options_create::set_what_to_check
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...
Definition: archive_options.hpp:442
libdar::archive_options_create::set_sig_block_len
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
Definition: archive_options.hpp:583
libdar::archive_options_create::set_selection
void set_selection(const mask &selection)
defines the filenames to only save (except directory) as those that match the given mask
libdar::archive_options_create::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
set the list of recipients that will be able to read the archive
Definition: archive_options.hpp:419
libdar::archive_options_create::set_multi_threaded_crypto
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
Definition: archive_options.hpp:542
libdar::archive_options_create::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition: archive_options.hpp:448
libdar::archive_options_extract
class holding optional parameters used to extract files from an existing archive
Definition: archive_options.hpp:1294
libdar::archive_options_extract::set_ea_mask
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to save
libdar::archive_options_extract::set_empty_dir
void set_empty_dir(bool empty_dir)
whether to restore directories where no file has been triggered for backup (no file/inode change,...
Definition: archive_options.hpp:1351
libdar::archive_options_extract::set_ignore_unix_sockets
void set_ignore_unix_sockets(bool val)
whether to ignore unix sockets while restoring
Definition: archive_options.hpp:1380
libdar::archive_options_extract::set_overwriting_rules
void set_overwriting_rules(const crit_action &over)
overwriting policy
libdar::archive_options_extract::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition: archive_options.hpp:1330
libdar::archive_options_extract::set_info_details
void set_info_details(bool info_details)
Definition: archive_options.hpp:1325
libdar::archive_options_extract::set_flat
void set_flat(bool flat)
whether to ignore directory structure and restore all files in the same directory
Definition: archive_options.hpp:1339
libdar::archive_options_extract::set_only_deleted
void set_only_deleted(bool val)
only consider deleted files (if set, no data get restored)
Definition: archive_options.hpp:1368
libdar::archive_options_extract::set_dirty_behavior
void set_dirty_behavior(t_dirty val)
alternative method to modify dirty behavior
Definition: archive_options.hpp:1360
libdar::archive_options_extract::set_ignore_deleted
void set_ignore_deleted(bool val)
do not consider deleted files (if set, no inode will be removed)
Definition: archive_options.hpp:1374
libdar::archive_options_extract::set_subtree
void set_subtree(const mask &subtree)
defines the directory and files to consider (this mask will be applied to the absolute path of files ...
libdar::archive_options_extract::set_in_place
void set_in_place(bool arg)
whether to ignore fs_root and use in-place path stored in the archive
Definition: archive_options.hpp:1383
libdar::archive_options_extract::set_warn_remove_no_match
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
Definition: archive_options.hpp:1345
libdar::archive_options_extract::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1333
libdar::archive_options_extract::set_empty
void set_empty(bool empty)
defines whether we need to store ignored directories as empty
Definition: archive_options.hpp:1348
libdar::archive_options_extract::set_selection
void set_selection(const mask &selection)
defines the filenames to only save (except directory) as those that match the given mask
libdar::archive_options_extract::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:1317
libdar::archive_options_extract::set_dirty_behavior
void set_dirty_behavior(bool ignore, bool warn)
whether to restore dirty files (those that changed during backup), warn before restoring or ignoring ...
Definition: archive_options.hpp:1357
libdar::archive_options_extract::set_fsa_scope
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
Definition: archive_options.hpp:1377
libdar::archive_options_extract::set_what_to_check
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 (...
Definition: archive_options.hpp:1342
libdar::archive_options_isolate
class holding optional parameters used to isolate an existing archive
Definition: archive_options.hpp:750
libdar::archive_options_isolate::set_crypto_size
void set_crypto_size(U_32 crypto_size)
size of the encryption by block to use
Definition: archive_options.hpp:821
libdar::archive_options_isolate::set_multi_threaded_crypto
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
Definition: archive_options.hpp:868
libdar::archive_options_isolate::set_warn_over
void set_warn_over(bool warn_over)
whether a warning shall be issued before overwriting
Definition: archive_options.hpp:769
libdar::archive_options_isolate::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition: archive_options.hpp:827
libdar::archive_options_isolate::set_delta_mask
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
libdar::archive_options_isolate::set_delta_signature
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
Definition: archive_options.hpp:875
libdar::archive_options_isolate::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:838
libdar::archive_options_isolate::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:792
libdar::archive_options_isolate::set_pause
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,...
Definition: archive_options.hpp:775
libdar::archive_options_isolate::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
cypher to use
Definition: archive_options.hpp:815
libdar::archive_options_isolate::set_allow_over
void set_allow_over(bool allow_over)
whether overwritting is allowed
Definition: archive_options.hpp:766
libdar::archive_options_isolate::set_sequential_marks
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive
Definition: archive_options.hpp:856
libdar::archive_options_isolate::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:859
libdar::archive_options_isolate::set_sig_block_len
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
Definition: archive_options.hpp:892
libdar::archive_options_isolate::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:847
libdar::archive_options_isolate::set_compression_level
void set_compression_level(U_I compression_level)
the compression level (from 1 to 9)
Definition: archive_options.hpp:781
libdar::archive_options_isolate::set_delta_sig_min_size
void set_delta_sig_min_size(const infinint &val)
Definition: archive_options.hpp:883
libdar::archive_options_isolate::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to created several thread to work possibily faster on multicore CPU (requir...
Definition: archive_options.hpp:865
libdar::archive_options_isolate::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:841
libdar::archive_options_isolate::set_execute
void set_execute(const std::string &execute)
command to execute after each slice creation
Definition: archive_options.hpp:812
libdar::archive_options_isolate::set_hash_algo
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
libdar::archive_options_isolate::set_compression
void set_compression(compression algo)
the compression algorithm used
Definition: archive_options.hpp:778
libdar::archive_options_isolate::set_compression_block_size
void set_compression_block_size(U_I compression_block_size)
set the compression block size
Definition: archive_options.hpp:785
libdar::archive_options_isolate::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:844
libdar::archive_options_isolate::set_multi_threaded_compress
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
Definition: archive_options.hpp:871
libdar::archive_options_isolate::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition: archive_options.hpp:832
libdar::archive_options_isolate::set_slice_min_digits
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...
Definition: archive_options.hpp:853
libdar::archive_options_isolate::set_info_details
void set_info_details(bool info_details)
whether the user needs detailed output of the operation
Definition: archive_options.hpp:772
libdar::archive_options_isolate::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition: archive_options.hpp:889
libdar::archive_options_isolate::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition: archive_options.hpp:886
libdar::archive_options_isolate::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
password / passphrase to encrypt the data with (empty string for interactive question)
Definition: archive_options.hpp:818
libdar::archive_options_isolate::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition: archive_options.hpp:835
libdar::archive_options_listing
class holding optional parameters used to list the contents of an existing archive
Definition: archive_options.hpp:1447
libdar::archive_options_listing::set_subtree
void set_subtree(const mask &subtree)
mask applied to the full path, only those matching it will be listed
libdar::archive_options_listing::set_display_ea
void set_display_ea(bool display_ea)
whether to fetch EA for listing
Definition: archive_options.hpp:1491
libdar::archive_options_listing::set_user_slicing
void set_user_slicing(const infinint &slicing_first, const infinint &slicing_others)
when slice location is performed, user may modify the slice layout of the archive
libdar::archive_options_listing::set_filter_unsaved
void set_filter_unsaved(bool filter_unsaved)
whether to only show entries that have their data fully saved
Definition: archive_options.hpp:1476
libdar::archive_options_listing::set_selection
void set_selection(const mask &selection)
mask applied to filename, only those marching it will be listed
libdar::archive_options_listing::set_info_details
void set_info_details(bool info_details)
whether output should be verbosed --> to be moved to shell output
Definition: archive_options.hpp:1463
libdar::archive_options_listing::set_slicing_location
void set_slicing_location(bool val)
whether to calculate the slice location of each file
Definition: archive_options.hpp:1479
libdar::archive_options_merge
class holding optional parameters used to proceed to the merge operation
Definition: archive_options.hpp:981
libdar::archive_options_merge::set_delta_signature
void set_delta_signature(bool val)
Definition: archive_options.hpp:1158
libdar::archive_options_merge::set_sequential_marks
void set_sequential_marks(bool sequential)
whether to activate escape sequence aka tape marks to allow sequential reading of the archive
Definition: archive_options.hpp:1121
libdar::archive_options_merge::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1028
libdar::archive_options_merge::set_compr_mask
void set_compr_mask(const mask &compr_mask)
defines files to compress
libdar::archive_options_merge::set_sig_block_len
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
Definition: archive_options.hpp:1175
libdar::archive_options_merge::set_empty
void set_empty(bool empty)
defines whether we do a dry-run execution
Definition: archive_options.hpp:1103
libdar::archive_options_merge::set_ea_mask
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to save
libdar::archive_options_merge::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition: archive_options.hpp:1080
libdar::archive_options_merge::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
Definition: archive_options.hpp:1025
libdar::archive_options_merge::set_multi_threaded_compress
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
Definition: archive_options.hpp:1151
libdar::archive_options_merge::set_slice_min_digits
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...
Definition: archive_options.hpp:1133
libdar::archive_options_merge::set_overwriting_rules
void set_overwriting_rules(const crit_action &overwrite)
policy to solve merging conflict
libdar::archive_options_merge::set_delta_mask
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
libdar::archive_options_merge::set_min_compr_size
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
Definition: archive_options.hpp:1100
libdar::archive_options_merge::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition: archive_options.hpp:1169
libdar::archive_options_merge::set_compression
void set_compression(compression compr_algo)
set the compression algorithm to be used
Definition: archive_options.hpp:1037
libdar::archive_options_merge::set_sparse_file_min_size
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
Definition: archive_options.hpp:1124
libdar::archive_options_merge::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
Definition: archive_options.hpp:1145
libdar::archive_options_merge::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition: archive_options.hpp:1076
libdar::archive_options_merge::set_crypto_size
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
Definition: archive_options.hpp:1083
libdar::archive_options_merge::set_keep_compressed
void set_keep_compressed(bool keep_compressed)
make dar ignore the 'algo' argument and do not uncompress / compress files that are selected for merg...
Definition: archive_options.hpp:1106
libdar::archive_options_merge::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition: archive_options.hpp:1089
libdar::archive_options_merge::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:1136
libdar::archive_options_merge::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition: archive_options.hpp:1172
libdar::archive_options_merge::set_info_details
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
Definition: archive_options.hpp:1019
libdar::archive_options_merge::set_multi_threaded_crypto
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
Definition: archive_options.hpp:1148
libdar::archive_options_merge::set_decremental_mode
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...
Definition: archive_options.hpp:1118
libdar::archive_options_merge::set_execute
void set_execute(const std::string &execute)
set the command to execute after each slice creation
Definition: archive_options.hpp:1073
libdar::archive_options_merge::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:1050
libdar::archive_options_merge::set_pause
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...
Definition: archive_options.hpp:1031
libdar::archive_options_merge::set_empty_dir
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
Definition: archive_options.hpp:1034
libdar::archive_options_merge::set_compression_block_size
void set_compression_block_size(U_I compression_block_size)
set the compression block size (0 for streamed compression)
Definition: archive_options.hpp:1043
libdar::archive_options_merge::set_allow_over
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
Definition: archive_options.hpp:1005
libdar::archive_options_merge::set_delta_sig_min_size
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...
Definition: archive_options.hpp:1166
libdar::archive_options_merge::set_subtree
void set_subtree(const mask &subtree)
defines the directory and files to consider (this mask will be applied to the absolute path of files ...
libdar::archive_options_merge::set_fsa_scope
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA are considered)
Definition: archive_options.hpp:1139
libdar::archive_options_merge::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition: archive_options.hpp:1094
libdar::archive_options_merge::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:1115
libdar::archive_options_merge::set_hash_algo
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
libdar::archive_options_merge::set_compression_level
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
Definition: archive_options.hpp:1040
libdar::archive_options_merge::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:1127
libdar::archive_options_merge::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:1109
libdar::archive_options_merge::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:1008
libdar::archive_options_merge::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:1112
libdar::archive_options_merge::set_selection
void set_selection(const mask &selection)
defines the filenames to only save (except directory) as those that match the given mask
libdar::archive_options_read
class holding optional parameters used to read an existing archive
Definition: archive_options.hpp:65
libdar::archive_options_read::set_input_pipe
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 "-")
Definition: archive_options.hpp:112
libdar::archive_options_read::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices
Definition: archive_options.hpp:155
libdar::archive_options_read::set_crypto_algo
void set_crypto_algo(crypto_algo val)
defines the the crypto cypher to use to read the archive (default is crypto_none)
Definition: archive_options.hpp:97
libdar::archive_options_read::set_ref_crypto_size
void set_ref_crypto_size(U_32 ref_crypto_size)
defines the crypto size for the reference catalogue
Definition: archive_options.hpp:187
libdar::archive_options_read::set_multi_threaded_compress
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
Definition: archive_options.hpp:170
libdar::archive_options_read::set_slice_min_digits
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...
Definition: archive_options.hpp:151
libdar::archive_options_read::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
defines the password or passphrase to decrypt (unused if encryption is not set)
Definition: archive_options.hpp:100
libdar::archive_options_read::archive_options_read
archive_options_read()
build an object and set options to their default values
libdar::archive_options_read::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to create several thread to work possibly faster on multicore CPU (need lib...
Definition: archive_options.hpp:164
libdar::archive_options_read::set_ref_crypto_pass
void set_ref_crypto_pass(const secu_string &ref_pass)
defines the pass for the reference catalogue
Definition: archive_options.hpp:184
libdar::archive_options_read::set_ref_entrepot
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...
Definition: archive_options.hpp:208
libdar::archive_options_read::clear
void clear()
reset all the options to their default values
libdar::archive_options_read::set_ignore_signature_check_failure
void set_ignore_signature_check_failure(bool val)
whether to warn (true) or ignore (false) signature failure (default is true)
Definition: archive_options.hpp:158
libdar::archive_options_read::unset_external_catalogue
void unset_external_catalogue()
clear any reference to an external catalogue
libdar::archive_options_read::set_ref_crypto_algo
void set_ref_crypto_algo(crypto_algo ref_crypto)
defines the crypto algo for the reference catalogue
Definition: archive_options.hpp:181
libdar::archive_options_read::set_lax
void set_lax(bool val)
defines whether any archive coherence error, system error or media error lead to the abortion of the ...
Definition: archive_options.hpp:141
libdar::archive_options_read::set_info_details
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
Definition: archive_options.hpp:134
libdar::archive_options_read::set_header_only
void set_header_only(bool val)
whether we only read the archive header and exit
Definition: archive_options.hpp:211
libdar::archive_options_read::set_ref_slice_min_digits
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...
Definition: archive_options.hpp:205
libdar::archive_options_read::set_ref_execute
void set_ref_execute(const std::string &ref_execute)
set the command to execute before reading each slice of the reference catalogue
Definition: archive_options.hpp:200
libdar::archive_options_read::set_output_pipe
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 "-")
Definition: archive_options.hpp:118
libdar::archive_options_read::set_execute
void set_execute(const std::string &execute)
set the command to execute before reading each slice (empty string for no script)
Definition: archive_options.hpp:131
libdar::archive_options_read::set_default_crypto_size
void set_default_crypto_size()
set the encryption block size to the default value
libdar::archive_options_read::set_sequential_read
void set_sequential_read(bool val)
defines whether to try reading the archive sequentially (ala tar) or using the final catalogue
Definition: archive_options.hpp:147
libdar::archive_options_read::set_crypto_size
void set_crypto_size(U_32 crypto_size)
the encryption block size to use to decrypt
Definition: archive_options.hpp:103
libdar::archive_options_read::set_multi_threaded_crypto
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
Definition: archive_options.hpp:167
libdar::archive_options_read::archive_options_read
archive_options_read(const archive_options_read &ref)
the copy constructor, assignment operator and destructor
Definition: archive_options.hpp:71
libdar::archive_options_read::set_external_catalogue
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 ...
Definition: archive_options.hpp:176
libdar::archive_options_repair
class holding optional parameters used to create an archive
Definition: archive_options.hpp:1720
libdar::archive_options_repair::set_display_finished
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio
Definition: archive_options.hpp:1766
libdar::archive_options_repair::set_allow_over
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
Definition: archive_options.hpp:1743
libdar::archive_options_repair::set_multi_threaded_compress
void set_multi_threaded_compress(U_I num)
how much thread libdar will use for compression (need libthreadar too and compression_block_size > 0)
Definition: archive_options.hpp:1859
libdar::archive_options_repair::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition: archive_options.hpp:1821
libdar::archive_options_repair::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition: archive_options.hpp:1799
libdar::archive_options_repair::set_slice_min_digits
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...
Definition: archive_options.hpp:1844
libdar::archive_options_repair::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:1830
libdar::archive_options_repair::set_execute
void set_execute(const std::string &execute)
set the command to execute after each slice creation
Definition: archive_options.hpp:1796
libdar::archive_options_repair::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:1827
libdar::archive_options_repair::set_crypto_size
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
Definition: archive_options.hpp:1806
libdar::archive_options_repair::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition: archive_options.hpp:1816
libdar::archive_options_repair::clear
void clear()
reset all the options to their default values
libdar::archive_options_repair::set_info_details
void set_info_details(bool info_details)
Definition: archive_options.hpp:1754
libdar::archive_options_repair::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:1833
libdar::archive_options_repair::set_pause
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...
Definition: archive_options.hpp:1769
libdar::archive_options_repair::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition: archive_options.hpp:1824
libdar::archive_options_repair::set_multi_threaded_crypto
void set_multi_threaded_crypto(U_I num)
how much thread libdar will use for cryptography (need libthreadar to be effective)
Definition: archive_options.hpp:1856
libdar::archive_options_repair::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition: archive_options.hpp:1760
libdar::archive_options_repair::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:1776
libdar::archive_options_repair::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1763
libdar::archive_options_repair::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:1836
libdar::archive_options_repair::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
Definition: archive_options.hpp:1853
libdar::archive_options_repair::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition: archive_options.hpp:1803
libdar::archive_options_repair::set_hash_algo
void set_hash_algo(hash_algo hash)
libdar::archive_options_repair::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:1746
libdar::archive_options_repair::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:1847
libdar::archive_options_test
class holding optional parameters used to test the structure coherence of an existing archive
Definition: archive_options.hpp:1647
libdar::archive_options_test::set_selection
void set_selection(const mask &selection)
list of filenames to consider (directory not concerned by this fiter)
libdar::archive_options_test::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1676
libdar::archive_options_test::set_subtree
void set_subtree(const mask &subtree)
defines the directory and files to consider (this mask will be applied to the absolute path of files ...
libdar::archive_options_test::set_empty
void set_empty(bool empty)
dry-run exectution if set to true
Definition: archive_options.hpp:1684
libdar::archive_options_test::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition: archive_options.hpp:1681
libdar::archive_options_test::set_info_details
void set_info_details(bool info_details)
Definition: archive_options.hpp:1673
libdar::crit_action
the global action for overwriting
Definition: crit_action.hpp:81
libdar::infinint
the arbitrary large positive integer class
Definition: real_infinint.hpp:62
libdar::mask
the generic class, parent of all masks
Definition: mask.hpp:62
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition: path.hpp:51
libdar::secu_string
class secu_string
Definition: secu_string.hpp:54
compile_time_features.hpp
nested namespace containing routines that give features activated at compile time
compression.hpp
compression parameters for API
crit_action.hpp
contains classes that let the user define the policy for overwriting files
crypto.hpp
the crypto algoritm definition
delta_sig_block_size.hpp
structure used to define how to select block size for delta signature
entrepot.hpp
defines the entrepot interface.
filesystem_ids.hpp
gather the ids of different filesystem to provide a filter based on filesystem
fsa_family.hpp
filesystem specific attributes available families and fsa_scope definition
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:44
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:53
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition: fsa_family.hpp:70
libdar::hash_algo
hash_algo
hashing algorithm available
Definition: archive_aux.hpp:63
libdar::compression
compression
the different compression algorithm available
Definition: compression.hpp:46
libdar::crypto_algo
crypto_algo
the different cypher available for encryption (strong or weak)
Definition: crypto.hpp:50
integers.hpp
are defined here basic integer types that tend to be portable
mask.hpp
here lies a collection of mask classes
mask_list.hpp
here lies a mask that selects files present in a given list
libdar::compile_time::librsync
bool librsync() noexcept
returns whether delta compression is available and delta diff stuff with it
libdar::compile_time::furtive_read
bool furtive_read() noexcept
returns whether libdar can support furtive read mode when run by privileged user
libdar::compile_time::nodump
bool nodump() noexcept
returns whether nodump flag support has been activated at compilation time
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47
secu_string.hpp
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
libdar::delta_sig_block_size
defines how to calculate delta signature block size based of file size to delta sign
Definition: delta_sig_block_size.hpp:47
libdar::delta_sig_block_size::check
void check() const
check the sanity of the provided values