Disk ARchive: archive_options.hpp Source File

| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
archive_options.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 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
49namespace libdar
50{
51 class archive; // needed to be able to use pointer on archive object.
52
53
57
60
62 extern const infinint default_iteration_count;
63
65 extern const infinint default_iteration_count_argon2;
66
68
69 class archive_options_read
70 {
71 public:
73 archive_options_read();
74
76 archive_options_read(const archive_options_read & ref) : x_ref_chem(ref.x_ref_chem) { copy_from(ref); };
77 archive_options_read(archive_options_read && ref) noexcept;
78 archive_options_read & operator = (const archive_options_read & ref) { copy_from(ref); return *this; };
79 archive_options_read & operator = (archive_options_read && ref) noexcept { move_from(std::move(ref)); return *this; };
80 ~archive_options_read() = default;
81
82
84 // set back to default (this is the state just after the object is constructed
85 // this method is to be used to reuse a given object
86
88 void clear();
89
90
92 // setting methods
93
94
96
102 void set_crypto_algo(crypto_algo val) { x_crypto = val; };
103
105 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
106
108 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
109
111 void set_default_crypto_size();
112
114
117 void set_input_pipe(const std::string & input_pipe) { x_input_pipe = input_pipe; };
118
120
123 void set_output_pipe(const std::string & output_pipe) { x_output_pipe = output_pipe; };
124
126
136 void set_execute(const std::string & execute) { x_execute = execute; };
137
139 void set_info_details(bool info_details) { x_info_details = info_details; };
140
142
146 void set_lax(bool val) { x_lax = val; };
147
149
151
152 void set_sequential_read(bool val) { x_sequential_read = val; };
153
155
156 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
157
158
160 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; };
161
163 void set_ignore_signature_check_failure(bool val) { x_ignore_signature_check_failure = val; };
164
166
169 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
170
172 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
173
175 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
176
178 void set_header_only(bool val) { x_header_only = val; };
179
181 void set_silent(bool val) { x_silent = val; };
182
184 void set_early_memory_release(bool val) { x_early_memory_release = val; };
185
187 void set_force_first_slice(bool val) { x_force_first_slice = val; };
188
189
191
193 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; };
195 void unset_external_catalogue();
196
198 void set_ref_crypto_algo(crypto_algo ref_crypto) { x_ref_crypto = ref_crypto; };
199
201 void set_ref_crypto_pass(const secu_string & ref_pass) { x_ref_pass = ref_pass; };
202
204 void set_ref_crypto_size(U_32 ref_crypto_size) { x_ref_crypto_size = ref_crypto_size; };
205
207
217 void set_ref_execute(const std::string & ref_execute) { x_ref_execute = ref_execute; };
218
219
221
222 void set_ref_slice_min_digits(infinint val) { x_ref_slice_min_digits = val; };
223
225 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; };
226
227
229 // getting methods (mainly used inside libdar, but kept public and part of the API in the case it is needed)
230
231
232 crypto_algo get_crypto_algo() const { return x_crypto; };
233 const secu_string & get_crypto_pass() const { return x_pass; };
234 U_32 get_crypto_size() const { return x_crypto_size; };
235 const std::string & get_input_pipe() const { return x_input_pipe; };
236 const std::string & get_output_pipe() const { return x_output_pipe; };
237 const std::string & get_execute() const { return x_execute; };
238 bool get_info_details() const { return x_info_details; };
239 bool get_lax() const { return x_lax; };
240 bool get_sequential_read() const { return x_sequential_read; };
241 infinint get_slice_min_digits() const { return x_slice_min_digits; };
242 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
243 bool get_ignore_signature_check_failure() const { return x_ignore_signature_check_failure; };
244 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
245 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
246 bool get_header_only() const { return x_header_only; };
247 bool get_silent() const { return x_silent; };
248 bool get_early_memory_release() const { return x_early_memory_release; };
249 bool get_force_first_slice() const { return x_force_first_slice; };
250
251 // All methods that follow concern the archive where to fetch the (isolated) catalogue from
252 bool is_external_catalogue_set() const { return external_cat; };
253 const path & get_ref_path() const;
254 const std::string & get_ref_basename() const;
255 crypto_algo get_ref_crypto_algo() const { return x_ref_crypto; };
256 const secu_string & get_ref_crypto_pass() const { return x_ref_pass; };
257 U_32 get_ref_crypto_size() const { return x_ref_crypto_size; };
258 const std::string & get_ref_execute() const { return x_ref_execute; };
259 infinint get_ref_slice_min_digits() const { return x_ref_slice_min_digits; };
260 const std::shared_ptr<entrepot> & get_ref_entrepot() const { return x_ref_entrepot; };
261
262 private:
263 crypto_algo x_crypto;
264 secu_string x_pass;
265 U_32 x_crypto_size;
266 std::string x_input_pipe;
267 std::string x_output_pipe;
268 std::string x_execute;
269 bool x_info_details;
270 bool x_lax;
271 bool x_sequential_read;
272 infinint x_slice_min_digits;
273 std::shared_ptr<entrepot> x_entrepot;
274 bool x_ignore_signature_check_failure;
275 U_I x_multi_threaded_crypto;
276 U_I x_multi_threaded_compress;
277 bool x_header_only;
278 bool x_silent;
279 bool x_early_memory_release;
280 bool x_force_first_slice;
281
282 // external catalogue relative fields
283 bool external_cat;
284 path x_ref_chem;
285 std::string x_ref_basename;
286 crypto_algo x_ref_crypto;
287 secu_string x_ref_pass;
288 U_32 x_ref_crypto_size;
289 std::string x_ref_execute;
290 infinint x_ref_slice_min_digits;
291 std::shared_ptr<entrepot> x_ref_entrepot;
292
293 void copy_from(const archive_options_read & ref);
294 void move_from(archive_options_read && ref) noexcept;
295 };
296
297
301
303
304 class archive_options_create
305 {
306 public:
307 static constexpr const char* default_excluding_ea = "user.libdar_no_backup";
308
309 // default constructors and destructor.
310
311 archive_options_create();
312 archive_options_create(const archive_options_create & ref);
313 archive_options_create(archive_options_create && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
314 archive_options_create & operator = (const archive_options_create & ref) { destroy(); copy_from(ref); return *this; };
315 archive_options_create & operator = (archive_options_create && ref) noexcept { move_from(std::move(ref)); return *this; };
316 ~archive_options_create() { destroy(); };
317
319 // set back to default (this is the state just after the object is constructed
320 // this method is to be used to reuse a given object
321
323 void clear();
324
325
327 // setting methods
328
330 void set_reference(std::shared_ptr<archive> ref_arch) { x_ref_arch = ref_arch; };
331
333 void set_selection(const mask & selection);
334
336
344 void set_subtree(const mask & subtree);
345
347 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
348
350 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
351
353
358 void set_info_details(bool info_details) { x_info_details = info_details; };
359
361
364 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
365
367 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
368
370 void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
371
373 void set_pause(const infinint & pause) { x_pause = pause; };
374
376 void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
377
379 void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
380
382 void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
383
385
394 void set_compression_block_size(U_I compression_block_size) { x_compression_block_size = compression_block_size; };
395
397
401 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
402 {
403 x_file_size = file_size;
404 if(first_file_size.is_zero())
405 x_first_file_size = file_size;
406 else
407 x_first_file_size = first_file_size;
408 };
409
410
412 void set_ea_mask(const mask & ea_mask);
413
415
425 void set_execute(const std::string & execute) { x_execute = execute; };
426
428 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
429
432 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
433
435 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
436
438
446 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
447
448
452 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
453
455 void set_compr_mask(const mask & compr_mask);
456
458 void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
459
461 void set_nodump(bool nodump) { x_nodump = nodump; };
462
465 void set_exclude_by_ea(const std::string & ea_name)
466 { exclude_by_ea = (ea_name == "" ? default_excluding_ea : ea_name); };
467
469 void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
470
472 void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
473
475 void set_empty(bool empty) { x_empty = empty; };
476
478
481 void set_alter_atime(bool alter_atime)
482 {
483 if(x_furtive_read)
484 x_old_alter_atime = alter_atime;
485 else
486 x_alter_atime = alter_atime;
487 };
488
490 void set_furtive_read_mode(bool furtive_read);
491
493
496 void set_same_fs(bool same_fs) { x_same_fs = same_fs; x_same_fs_include.clear(); x_same_fs_exclude.clear(); };
497
499
501 void set_same_fs_include(const std::string & included_path_to_fs) { x_same_fs_include.push_back(included_path_to_fs); };
502
504
506 void set_same_fs_exclude(const std::string & excluded_path_to_fs) { x_same_fs_exclude.push_back(excluded_path_to_fs); };
507
509 void set_snapshot(bool snapshot) { x_snapshot = snapshot; };
510
512 void set_cache_directory_tagging(bool cache_directory_tagging) { x_cache_directory_tagging = cache_directory_tagging; };
513
515 void set_fixed_date(const infinint & fixed_date) { x_fixed_date = fixed_date; };
516
518 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
519
521 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
522
524 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
525
527 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; };
528
530 void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
531
533 void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
534
536 void set_security_check(bool check) { x_security_check = check; };
537
539 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
540
542
545 void set_hash_algo(hash_algo hash);
546
548 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
549
551 void set_backup_hook(const std::string & execute, const mask & which_files);
552
554 void set_ignore_unknown_inode_type(bool val) { x_ignore_unknown = val; };
555
557 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; };
558
560 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
561
563
566 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
567
569 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
570
572 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
573
575
577 void set_delta_diff(bool val) { if(val && !compile_time::librsync()) throw Ecompilation("librsync"); x_delta_diff = val; };
578
580 void set_delta_signature(bool val) { x_delta_signature = val; };
581
583 void set_delta_mask(const mask & delta_mask);
584
586
588 void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
589
591 void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
592
594 void set_auto_zeroing_neg_dates(bool val) { x_auto_zeroing_neg_dates = val; };
595
597
600 void set_ignored_as_symlink(const std::set<std::string> & list) { x_ignored_as_symlink = list; };
601
603
604 void set_modified_data_detection(modified_data_detection val) { x_modified_data_detection = val; };
605
607 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
608
610 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
611
613 void set_never_resave_uncompressed(bool val) { x_never_resave_uncompressed = val; };
614
616 // getting methods
617
618 std::shared_ptr<archive> get_reference() const { return x_ref_arch; };
619 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
620 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
621 bool get_allow_over() const { return x_allow_over; };
622 bool get_warn_over() const { return x_warn_over; };
623 bool get_info_details() const { return x_info_details; };
624 bool get_display_treated() const { return x_display_treated; };
625 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
626 bool get_display_skipped() const { return x_display_skipped; };
627 bool get_display_finished() const { return x_display_finished; };
628 const infinint & get_pause() const { return x_pause; };
629 bool get_empty_dir() const { return x_empty_dir; };
630 compression get_compression() const { return x_compr_algo; };
631 U_I get_compression_level() const { return x_compression_level; };
632 U_I get_compression_block_size() const { return x_compression_block_size; };
633 const infinint & get_slice_size() const { return x_file_size; };
634 const infinint & get_first_slice_size() const { return x_first_file_size; };
635 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
636 const std::string & get_execute() const { return x_execute; };
637 crypto_algo get_crypto_algo() const { return x_crypto; };
638 const secu_string & get_crypto_pass() const { return x_pass; };
639 U_32 get_crypto_size() const { return x_crypto_size; };
640 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
641 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
642 const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
643 const infinint & get_min_compr_size() const { return x_min_compr_size; };
644 bool get_nodump() const { return x_nodump; };
645 const std::string & get_exclude_by_ea() const { return exclude_by_ea; };
646 comparison_fields get_comparison_fields() const { return x_what_to_check; };
647 const infinint & get_hourshift() const { return x_hourshift; };
648 bool get_empty() const { return x_empty; };
649 bool get_alter_atime() const { return x_alter_atime; };
650 bool get_furtive_read_mode() const { return x_furtive_read; };
651 bool get_same_fs() const { return x_same_fs; };
652 std::deque<std::string> get_same_fs_include() const { return x_same_fs_include; };
653 std::deque<std::string> get_same_fs_exclude() const { return x_same_fs_exclude; };
654 bool get_snapshot() const { return x_snapshot; };
655 bool get_cache_directory_tagging() const { return x_cache_directory_tagging; };
656 const infinint & get_fixed_date() const { return x_fixed_date; };
657 const std::string & get_slice_permission() const { return x_slice_permission; };
658 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
659 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
660 const infinint & get_repeat_count() const { return x_repeat_count; };
661 const infinint & get_repeat_byte() const { return x_repeat_byte; };
662 bool get_sequential_marks() const { return x_sequential_marks; };
663 infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
664 bool get_security_check() const { return x_security_check; };
665 const std::string & get_user_comment() const { return x_user_comment; };
666 hash_algo get_hash_algo() const { return x_hash; };
667 infinint get_slice_min_digits() const { return x_slice_min_digits; };
668 const std::string & get_backup_hook_file_execute() const { return x_backup_hook_file_execute; };
669 const mask & get_backup_hook_file_mask() const { return *x_backup_hook_file_mask; };
670 bool get_ignore_unknown_inode_type() const { return x_ignore_unknown; };
671 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
672 const fsa_scope & get_fsa_scope() const { return x_scope; };
673 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
674 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
675 bool get_delta_diff() const { return x_delta_diff; };
676 bool get_delta_signature() const { return x_delta_signature; };
677 const mask & get_delta_mask() const { return *x_delta_mask; }
678 bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
679 const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
680 delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
681 bool get_auto_zeroing_neg_dates() const { return x_auto_zeroing_neg_dates; };
682 const std::set<std::string> & get_ignored_as_symlink() const { return x_ignored_as_symlink; };
683 modified_data_detection get_modified_data_detection() const { return x_modified_data_detection; };
684 const infinint & get_iteration_count() const { return x_iteration_count; };
685 hash_algo get_kdf_hash() const { return x_kdf_hash; };
686 bool get_never_resave_uncompressed() const { return x_never_resave_uncompressed; };
687
688 private:
689 std::shared_ptr<archive> x_ref_arch;
690 mask * x_selection;
691 mask * x_subtree;
692 bool x_allow_over;
693 bool x_warn_over;
694 bool x_info_details;
695 bool x_display_treated;
696 bool x_display_treated_only_dir;
697 bool x_display_skipped;
698 bool x_display_finished;
699 infinint x_pause;
700 bool x_empty_dir;
701 compression x_compr_algo;
702 U_I x_compression_level;
703 U_I x_compression_block_size;
704 infinint x_file_size;
705 infinint x_first_file_size;
706 mask * x_ea_mask;
707 std::string x_execute;
708 crypto_algo x_crypto;
709 secu_string x_pass;
710 U_32 x_crypto_size;
711 std::vector<std::string> x_gnupg_recipients;
712 std::vector<std::string> x_gnupg_signatories;
713 mask * x_compr_mask;
714 infinint x_min_compr_size;
715 bool x_nodump;
716 std::string exclude_by_ea;
717 comparison_fields x_what_to_check;
718 infinint x_hourshift;
719 bool x_empty;
720 bool x_alter_atime;
721 bool x_old_alter_atime;
722 bool x_furtive_read;
723 bool x_same_fs;
724 std::deque<std::string> x_same_fs_include;
725 std::deque<std::string> x_same_fs_exclude;
726 bool x_snapshot;
727 bool x_cache_directory_tagging;
728 infinint x_fixed_date;
729 std::string x_slice_permission;
730 std::string x_slice_user_ownership;
731 std::string x_slice_group_ownership;
732 infinint x_repeat_count;
733 infinint x_repeat_byte;
734 bool x_sequential_marks;
735 infinint x_sparse_file_min_size;
736 bool x_security_check;
737 std::string x_user_comment;
738 hash_algo x_hash;
739 infinint x_slice_min_digits;
740 mask * x_backup_hook_file_mask;
741 std::string x_backup_hook_file_execute;
742 bool x_ignore_unknown;
743 std::shared_ptr<entrepot> x_entrepot;
744 fsa_scope x_scope;
745 U_I x_multi_threaded_crypto;
746 U_I x_multi_threaded_compress;
747 bool x_delta_diff;
748 bool x_delta_signature;
749 mask *x_delta_mask;
750 bool has_delta_mask_been_set;
751 infinint x_delta_sig_min_size;
752 delta_sig_block_size x_sig_block_len;
753 bool x_auto_zeroing_neg_dates;
754 std::set<std::string> x_ignored_as_symlink;
755 modified_data_detection x_modified_data_detection;
756 infinint x_iteration_count;
757 hash_algo x_kdf_hash;
758 bool x_never_resave_uncompressed;
759
760 void nullifyptr() noexcept;
761 void destroy() noexcept;
762 void copy_from(const archive_options_create & ref);
763 void move_from(archive_options_create && ref) noexcept;
764 void destroy_mask(mask * & ptr);
765 void clean_mask(mask * & ptr);
766 void check_mask(const mask & m);
767 };
768
769
770
771
772
773
777
779
780 class archive_options_isolate
781 {
782 public:
783 archive_options_isolate();
784 archive_options_isolate(const archive_options_isolate & ref);
785 archive_options_isolate(archive_options_isolate && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
786 archive_options_isolate & operator = (const archive_options_isolate & ref) { destroy(); copy_from(ref); return *this; };
787 archive_options_isolate & operator = (archive_options_isolate && ref) noexcept { move_from(std::move(ref)); return *this; };
788 ~archive_options_isolate() { destroy(); };
789
790
791 void clear();
792
794 // setting methods
795
797 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
798
800 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
801
803 void set_info_details(bool info_details) { x_info_details = info_details; };
804
806 void set_pause(const infinint & pause) { x_pause = pause; };
807
809 void set_compression(compression algo) { x_algo = algo; };
810
812 void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
813
815
816 void set_compression_block_size(U_I compression_block_size) { x_compression_block_size = compression_block_size; };
817
819
823 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
824 {
825 x_file_size = file_size;
826 if(first_file_size.is_zero())
827 x_first_file_size = file_size;
828 else
829 x_first_file_size = first_file_size;
830 };
831
833
843 void set_execute(const std::string & execute) { x_execute = execute; };
844
846 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
847
849 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
850
852 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
853
858 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
859
863 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
864
866 void set_empty(bool empty) { x_empty = empty; };
867
869 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
870
872 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
873
875 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
876
878 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
879
881 void set_hash_algo(hash_algo hash);
882
884 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
885
887 void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
888
890 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; };
891
893
896 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
897
899 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
900
902 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
903
904
906 void set_delta_signature(bool val) { x_delta_signature = val; };
907
909
916 void set_delta_mask(const mask & delta_mask);
917
921 void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
922
924 void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
925
927 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
928
930 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
931
932
934 void set_repair_mode(bool mode) { x_repair_mode = mode; };
935
937 // getting methods
938
939 bool get_allow_over() const { return x_allow_over; };
940 bool get_warn_over() const { return x_warn_over; };
941 bool get_info_details() const { return x_info_details; };
942 const infinint & get_pause() const { return x_pause; };
943 compression get_compression() const { return x_algo; };
944 U_I get_compression_level() const { return x_compression_level; };
945 U_I get_compression_block_size() const { return x_compression_block_size; };
946 const infinint & get_slice_size() const { return x_file_size; };
947 const infinint & get_first_slice_size() const { return x_first_file_size; };
948 const std::string & get_execute() const { return x_execute; };
949 crypto_algo get_crypto_algo() const { return x_crypto; };
950 const secu_string & get_crypto_pass() const { return x_pass; };
951 U_32 get_crypto_size() const { return x_crypto_size; };
952 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
953 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
954 bool get_empty() const { return x_empty; };
955 const std::string & get_slice_permission() const { return x_slice_permission; };
956 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
957 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
958 const std::string & get_user_comment() const { return x_user_comment; };
959 hash_algo get_hash_algo() const { return x_hash; };
960 infinint get_slice_min_digits() const { return x_slice_min_digits; };
961 bool get_sequential_marks() const { return x_sequential_marks; };
962 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
963 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
964 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
965 bool get_delta_signature() const { return x_delta_signature; };
966 const mask & get_delta_mask() const { return *x_delta_mask; }
967 bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
968 const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
969 delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
970 const infinint & get_iteration_count() const { return x_iteration_count; };
971 hash_algo get_kdf_hash() const { return x_kdf_hash; };
972 bool get_repair_mode() const { return x_repair_mode; };
973
974 private:
975 bool x_allow_over;
976 bool x_warn_over;
977 bool x_info_details;
978 infinint x_pause;
979 compression x_algo;
980 U_I x_compression_level;
981 U_I x_compression_block_size;
982 infinint x_file_size;
983 infinint x_first_file_size;
984 std::string x_execute;
985 crypto_algo x_crypto;
986 secu_string x_pass;
987 U_32 x_crypto_size;
988 std::vector<std::string> x_gnupg_recipients;
989 std::vector<std::string> x_gnupg_signatories;
990 bool x_empty;
991 std::string x_slice_permission;
992 std::string x_slice_user_ownership;
993 std::string x_slice_group_ownership;
994 std::string x_user_comment;
995 hash_algo x_hash;
996 infinint x_slice_min_digits;
997 bool x_sequential_marks;
998 std::shared_ptr<entrepot> x_entrepot;
999 U_I x_multi_threaded_crypto;
1000 U_I x_multi_threaded_compress;
1001 bool x_delta_signature;
1002 mask *x_delta_mask;
1003 bool has_delta_mask_been_set;
1004 infinint x_delta_sig_min_size;
1005 delta_sig_block_size x_sig_block_len;
1006 infinint x_iteration_count;
1007 hash_algo x_kdf_hash;
1008 bool x_repair_mode;
1009
1010 void copy_from(const archive_options_isolate & ref);
1011 void move_from(archive_options_isolate && ref) noexcept;
1012 void destroy() noexcept;
1013 void nullifyptr() noexcept;
1014 };
1015
1016
1017
1021
1023 class archive_options_merge
1024 {
1025 public:
1026
1027 archive_options_merge() { nullifyptr(); clear(); };
1028 archive_options_merge(const archive_options_merge & ref) { copy_from(ref); };
1029 archive_options_merge(archive_options_merge && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1030 archive_options_merge & operator = (const archive_options_merge & ref) { destroy(); copy_from(ref); return *this; };
1031 archive_options_merge & operator = (archive_options_merge && ref) noexcept { move_from(std::move(ref)); return *this; };
1032 ~archive_options_merge() { destroy(); };
1033
1034 void clear();
1035
1037 // setting methods
1038
1039 void set_auxiliary_ref(std::shared_ptr<archive> ref) { x_ref = ref; };
1040
1042 void set_selection(const mask & selection);
1043
1045
1055 void set_subtree(const mask & subtree);
1056
1058 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
1059
1061 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1062
1064 void set_overwriting_rules(const crit_action & overwrite);
1065
1067
1072 void set_info_details(bool info_details) { x_info_details = info_details; };
1073
1075
1078 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1079
1081 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1082
1084 void set_pause(const infinint & pause) { x_pause = pause; };
1085
1087 void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
1088
1090 void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
1091
1093 void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
1094
1096 void set_compression_block_size(U_I compression_block_size) { x_compression_block_size = compression_block_size; };
1097
1099
1103 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
1104 {
1105 x_file_size = file_size;
1106 if(first_file_size.is_zero())
1107 x_first_file_size = file_size;
1108 else
1109 x_first_file_size = first_file_size;
1110 };
1111
1113 void set_ea_mask(const mask & ea_mask);
1114
1116
1126 void set_execute(const std::string & execute) { x_execute = execute; };
1127
1129 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
1130
1133 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
1134
1136 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1137
1142 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1143
1147 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1148
1150 void set_compr_mask(const mask & compr_mask);
1151
1153 void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
1154
1156 void set_empty(bool empty) { x_empty = empty; };
1157
1159 void set_keep_compressed(bool keep_compressed) { x_keep_compressed = keep_compressed; };
1160
1162 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1163
1165 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1166
1168 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1169
1171 void set_decremental_mode(bool mode) { x_decremental = mode; };
1172
1174 void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
1175
1177 void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
1178
1180 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1181
1183 void set_hash_algo(hash_algo hash);
1184
1186 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1187
1189 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; };
1190
1192 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1193
1195
1198 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
1199
1201 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
1202
1204 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
1205
1211 void set_delta_signature(bool val) { x_delta_signature = val; };
1212
1214 void set_delta_mask(const mask & delta_mask);
1215
1217
1219 void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
1220
1222 void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
1223
1225 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
1226
1228 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
1229
1231 void set_never_resave_uncompressed(bool val) { x_never_resave_uncompressed = val; };
1232
1233
1235 // getting methods
1236
1237 std::shared_ptr<archive> get_auxiliary_ref() const { return x_ref; };
1238 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1239 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1240 bool get_allow_over() const { return x_allow_over; };
1241 bool get_warn_over() const { return x_warn_over; };
1242 const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1243 bool get_info_details() const { return x_info_details; };
1244 bool get_display_treated() const { return x_display_treated; };
1245 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1246 bool get_display_skipped() const { return x_display_skipped; };
1247 const infinint & get_pause() const { return x_pause; };
1248 bool get_empty_dir() const { return x_empty_dir; };
1249 compression get_compression() const { return x_compr_algo; };
1250 U_I get_compression_level() const { return x_compression_level; };
1251 U_I get_compression_block_size() const { return x_compression_block_size; };
1252 const infinint & get_slice_size() const { return x_file_size; };
1253 const infinint & get_first_slice_size() const { return x_first_file_size; };
1254 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1255 const std::string & get_execute() const { return x_execute; };
1256 crypto_algo get_crypto_algo() const { return x_crypto; };
1257 const secu_string & get_crypto_pass() const { return x_pass; };
1258 U_32 get_crypto_size() const { return x_crypto_size; };
1259 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1260 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1261 const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
1262 const infinint & get_min_compr_size() const { return x_min_compr_size; };
1263 bool get_empty() const { return x_empty; };
1264 bool get_keep_compressed() const { return x_keep_compressed; };
1265 const std::string & get_slice_permission() const { return x_slice_permission; };
1266 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1267 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1268 bool get_decremental_mode() const { return x_decremental; };
1269 bool get_sequential_marks() const { return x_sequential_marks; };
1270 infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
1271 const std::string & get_user_comment() const { return x_user_comment; };
1272 hash_algo get_hash_algo() const { return x_hash; };
1273 infinint get_slice_min_digits() const { return x_slice_min_digits; };
1274 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1275 const fsa_scope & get_fsa_scope() const { return x_scope; };
1276 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
1277 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
1278 bool get_delta_signature() const { return x_delta_signature; };
1279 const mask & get_delta_mask() const { return *x_delta_mask; }
1280 bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
1281 const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
1282 delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
1283 const infinint & get_iteration_count() const { return x_iteration_count; };
1284 hash_algo get_kdf_hash() const { return x_kdf_hash; };
1285 bool get_never_resave_uncompressed() const { return x_never_resave_uncompressed; };
1286
1287 private:
1288 std::shared_ptr<archive> x_ref;
1289 mask * x_selection;
1290 mask * x_subtree;
1291 bool x_allow_over;
1292 bool x_warn_over;
1293 crit_action * x_overwrite;
1294 bool x_info_details;
1295 bool x_display_treated;
1296 bool x_display_treated_only_dir;
1297 bool x_display_skipped;
1298 infinint x_pause;
1299 bool x_empty_dir;
1300 compression x_compr_algo;
1301 U_I x_compression_level;
1302 U_I x_compression_block_size;
1303 infinint x_file_size;
1304 infinint x_first_file_size;
1305 mask * x_ea_mask;
1306 std::string x_execute;
1307 crypto_algo x_crypto;
1308 secu_string x_pass;
1309 U_32 x_crypto_size;
1310 std::vector<std::string> x_gnupg_recipients;
1311 std::vector<std::string> x_gnupg_signatories;
1312 mask * x_compr_mask;
1313 infinint x_min_compr_size;
1314 bool x_empty;
1315 bool x_keep_compressed;
1316 std::string x_slice_permission;
1317 std::string x_slice_user_ownership;
1318 std::string x_slice_group_ownership;
1319 bool x_decremental;
1320 bool x_sequential_marks;
1321 infinint x_sparse_file_min_size;
1322 std::string x_user_comment;
1323 hash_algo x_hash;
1324 infinint x_slice_min_digits;
1325 std::shared_ptr<entrepot> x_entrepot;
1326 fsa_scope x_scope;
1327 U_I x_multi_threaded_crypto;
1328 U_I x_multi_threaded_compress;
1329 bool x_delta_signature;
1330 mask *x_delta_mask;
1331 bool has_delta_mask_been_set;
1332 infinint x_delta_sig_min_size;
1333 delta_sig_block_size x_sig_block_len;
1334 infinint x_iteration_count;
1335 hash_algo x_kdf_hash;
1336 bool x_never_resave_uncompressed;
1337
1338 void destroy() noexcept;
1339 void copy_from(const archive_options_merge & ref);
1340 void move_from(archive_options_merge && ref) noexcept;
1341 void nullifyptr() noexcept;
1342 };
1343
1344
1348
1350 class archive_options_extract
1351 {
1352 public:
1353 enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1354
1355 archive_options_extract() { nullifyptr(); clear(); };
1356 archive_options_extract(const archive_options_extract & ref) { copy_from(ref); };
1357 archive_options_extract(archive_options_extract && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1358 archive_options_extract & operator = (const archive_options_extract & ref) { destroy(); copy_from(ref); return *this; };
1359 archive_options_extract & operator = (archive_options_extract && ref) noexcept { move_from(std::move(ref)); return *this; };
1360 ~archive_options_extract() { destroy(); };
1361
1362 void clear();
1363
1365 // setting methods
1366
1368 void set_selection(const mask & selection);
1369
1371
1381 void set_subtree(const mask & subtree);
1382
1384 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1385
1392 void set_info_details(bool info_details) { x_info_details = info_details; };
1393
1397 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1398
1400 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1401
1403 void set_ea_mask(const mask & ea_mask);
1404
1406 void set_flat(bool flat) { x_flat = flat; };
1407
1409 void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1410
1412 void set_warn_remove_no_match(bool warn_remove_no_match) { x_warn_remove_no_match = warn_remove_no_match; };
1413
1415 void set_empty(bool empty) { x_empty = empty; };
1416
1418 void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
1419
1421
1424 void set_dirty_behavior(bool ignore, bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1425
1427 void set_dirty_behavior(t_dirty val) { x_dirty = val; };
1428
1430 void set_overwriting_rules(const crit_action & over);
1431
1433
1435 void set_only_deleted(bool val) { x_only_deleted = val; };
1436
1437
1439
1441 void set_ignore_deleted(bool val) { x_ignore_deleted = val; };
1442
1444 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1445
1447 void set_ignore_unix_sockets(bool val) { x_ignore_unix_sockets = val; };
1448
1450 void set_in_place(bool arg) { x_in_place = arg; };
1451
1452
1454 // getting methods
1455
1456 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1457 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1458 bool get_warn_over() const { return x_warn_over; };
1459 bool get_info_details() const { return x_info_details; };
1460 bool get_display_treated() const { return x_display_treated; };
1461 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1462 bool get_display_skipped() const { return x_display_skipped; };
1463 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1464 bool get_flat() const { return x_flat; };
1465 comparison_fields get_what_to_check() const { return x_what_to_check; };
1466 bool get_warn_remove_no_match() const { return x_warn_remove_no_match; };
1467 bool get_empty() const { return x_empty; };
1468 bool get_empty_dir() const { return x_empty_dir; };
1469 t_dirty get_dirty_behavior() const { return x_dirty; }
1470 const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1471 bool get_only_deleted() const { return x_only_deleted; };
1472 bool get_ignore_deleted() const { return x_ignore_deleted; };
1473 const fsa_scope & get_fsa_scope() const { return x_scope; };
1474 bool get_ignore_unix_sockets() const { return x_ignore_unix_sockets; };
1475 bool get_in_place() const { return x_in_place; };
1476
1477 private:
1478 mask * x_selection;
1479 mask * x_subtree;
1480 bool x_warn_over;
1481 bool x_info_details;
1482 bool x_display_treated;
1483 bool x_display_treated_only_dir;
1484 bool x_display_skipped;
1485 mask * x_ea_mask;
1486 bool x_flat;
1487 comparison_fields x_what_to_check;
1488 bool x_warn_remove_no_match;
1489 bool x_empty;
1490 bool x_empty_dir;
1491 t_dirty x_dirty;
1492 crit_action *x_overwrite;
1493 bool x_only_deleted;
1494 bool x_ignore_deleted;
1495 fsa_scope x_scope;
1496 bool x_ignore_unix_sockets;
1497 bool x_in_place;
1498
1499 void destroy() noexcept;
1500 void nullifyptr() noexcept;
1501 void copy_from(const archive_options_extract & ref);
1502 void move_from(archive_options_extract && ref) noexcept;
1503 };
1504
1505
1506
1507
1511
1513 class archive_options_listing
1514 {
1515 public:
1516 archive_options_listing() { nullifyptr(); clear(); };
1517 archive_options_listing(const archive_options_listing & ref) { copy_from(ref); };
1518 archive_options_listing(archive_options_listing && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1519 archive_options_listing & operator = (const archive_options_listing & ref) { destroy(); copy_from(ref); return *this; };
1520 archive_options_listing & operator = (archive_options_listing && ref) noexcept { move_from(std::move(ref)); return *this; };
1521 virtual ~archive_options_listing() { destroy(); };
1522
1523 virtual void clear();
1524
1525
1527 // setting methods
1528
1530 void set_info_details(bool info_details) { x_info_details = info_details; };
1531
1533
1535 void set_selection(const mask & selection);
1536
1538
1548 void set_subtree(const mask & subtree);
1549
1551 void set_filter_unsaved(bool filter_unsaved) { x_filter_unsaved = filter_unsaved; };
1552
1554 void set_slicing_location(bool val) { x_slicing_location = val; };
1555
1557
1561 void set_user_slicing(const infinint & slicing_first, const infinint & slicing_others);
1562
1564
1566 void set_display_ea(bool display_ea) { x_display_ea = display_ea; };
1567
1568
1570 // getting methods
1571
1572 bool get_info_details() const { return x_info_details; };
1573 const mask & get_selection() const;
1574 const mask & get_subtree() const;
1575 bool get_filter_unsaved() const { return x_filter_unsaved; };
1576 bool get_user_slicing(infinint & slicing_first, infinint & slicing_others) const;
1577 bool get_slicing_location() const { return x_slicing_location; };
1578 bool get_display_ea() const { return x_display_ea; };
1579
1580 private:
1581 bool x_info_details;
1582 mask * x_selection;
1583 mask * x_subtree;
1584 bool x_filter_unsaved;
1585 infinint *x_slicing_first;
1586 infinint *x_slicing_others;
1587 bool x_slicing_location;
1588 bool x_display_ea;
1589
1590 void destroy() noexcept;
1591 void nullifyptr() noexcept;
1592 void copy_from(const archive_options_listing & ref);
1593 void move_from(archive_options_listing && ref) noexcept;
1594 };
1595
1599
1600
1601 class archive_options_diff
1602 {
1603 public:
1604 archive_options_diff() { nullifyptr(); clear(); };
1605 archive_options_diff(const archive_options_diff & ref) { copy_from(ref); };
1606 archive_options_diff(archive_options_diff && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1607 archive_options_diff & operator = (const archive_options_diff & ref) { destroy(); copy_from(ref); return *this; };
1608 archive_options_diff & operator = (archive_options_diff && ref) noexcept { move_from(std::move(ref)); return *this; };
1609 ~archive_options_diff() { destroy(); };
1610
1611 void clear();
1612
1614 // setting methods
1615
1617 void set_selection(const mask & selection);
1618
1620
1630 void set_subtree(const mask & subtree);
1631
1638 void set_info_details(bool info_details) { x_info_details = info_details; };
1639
1643 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1644
1646 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1647
1649 void set_ea_mask(const mask & ea_mask);
1650
1652 void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1653
1655
1658 void set_alter_atime(bool alter_atime)
1659 {
1660 if(x_furtive_read)
1661 x_old_alter_atime = alter_atime;
1662 else
1663 x_alter_atime = alter_atime;
1664 };
1665
1667 void set_furtive_read_mode(bool furtive_read);
1668
1670 void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
1671
1673 void set_compare_symlink_date(bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1674
1676 void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1677
1679 void set_in_place(bool arg) { x_in_place = arg; };
1680
1682 void set_auto_zeroing_neg_dates(bool val) { x_auto_zeroing_neg_dates = val; };
1683
1684
1685
1687 // getting methods
1688
1689 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1690 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1691 bool get_info_details() const { return x_info_details; };
1692 bool get_display_treated() const { return x_display_treated; };
1693 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1694 bool get_display_skipped() const { return x_display_skipped; };
1695 const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1696 comparison_fields get_what_to_check() const { return x_what_to_check; };
1697 bool get_alter_atime() const { return x_alter_atime; };
1698 bool get_furtive_read_mode() const { return x_furtive_read; };
1699 const infinint & get_hourshift() const { return x_hourshift; };
1700 bool get_compare_symlink_date() const { return x_compare_symlink_date; };
1701 const fsa_scope & get_fsa_scope() const { return x_scope; };
1702 bool get_in_place() const { return x_in_place; };
1703 bool get_auto_zeroing_neg_dates() const { return x_auto_zeroing_neg_dates; };
1704
1705 private:
1706 mask * x_selection;
1707 mask * x_subtree;
1708 bool x_info_details;
1709 bool x_display_treated;
1710 bool x_display_treated_only_dir;
1711 bool x_display_skipped;
1712 mask * x_ea_mask;
1713 comparison_fields x_what_to_check;
1714 bool x_alter_atime;
1715 bool x_old_alter_atime;
1716 bool x_furtive_read;
1717 infinint x_hourshift;
1718 bool x_compare_symlink_date;
1719 fsa_scope x_scope;
1720 bool x_in_place;
1721 bool x_auto_zeroing_neg_dates;
1722
1723 void destroy() noexcept;
1724 void nullifyptr() noexcept;
1725 void copy_from(const archive_options_diff & ref);
1726 void move_from(archive_options_diff && ref) noexcept;
1727 };
1728
1729
1730
1731
1735
1737 class archive_options_test
1738 {
1739 public:
1740 archive_options_test() { nullifyptr(); clear(); };
1741 archive_options_test(const archive_options_test & ref) { copy_from(ref); };
1742 archive_options_test(archive_options_test && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1743 archive_options_test & operator = (const archive_options_test & ref) { destroy(); copy_from(ref); return *this; };
1744 archive_options_test & operator = (archive_options_test && ref) noexcept { move_from(std::move(ref)); return *this; };
1745 ~archive_options_test() { destroy(); };
1746
1747 void clear();
1748
1750 // setting methods
1751
1753 void set_selection(const mask & selection);
1754
1756
1766 void set_subtree(const mask & subtree);
1767
1774 void set_info_details(bool info_details) { x_info_details = info_details; };
1775
1777 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1778
1782 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1783
1785 void set_empty(bool empty) { x_empty = empty; };
1786
1787
1789 // getting methods
1790
1791 const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1792 const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1793 bool get_info_details() const { return x_info_details; };
1794 bool get_display_treated() const { return x_display_treated; };
1795 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1796 bool get_display_skipped() const { return x_display_skipped; };
1797 bool get_empty() const { return x_empty; };
1798
1799 private:
1800 mask * x_selection;
1801 mask * x_subtree;
1802 bool x_info_details;
1803 bool x_display_treated;
1804 bool x_display_treated_only_dir;
1805 bool x_display_skipped;
1806 bool x_empty;
1807
1808 void destroy() noexcept;
1809 void nullifyptr() noexcept;
1810 void copy_from(const archive_options_test & ref);
1811 void move_from(archive_options_test && ref) noexcept;
1812 };
1813
1814
1818
1820 class archive_options_repair
1821 {
1822 public:
1823 // default constructors and destructor.
1824
1825 archive_options_repair();
1826 archive_options_repair(const archive_options_repair & ref);
1827 archive_options_repair(archive_options_repair && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1828 archive_options_repair & operator = (const archive_options_repair & ref) { copy_from(ref); return *this; };
1829 archive_options_repair & operator = (archive_options_repair && ref) noexcept { move_from(std::move(ref)); return *this; };
1830 ~archive_options_repair() = default;
1831
1833 // set back to default (this is the state just after the object is constructed
1834 // this method is to be used to reuse a given object
1835
1837 void clear();
1838
1839
1841 // setting methods
1842
1844 void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
1845
1847 void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1848
1855 void set_info_details(bool info_details) { x_info_details = info_details; };
1856
1861 void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1862
1864 void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1865
1867 void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
1868
1870 void set_pause(const infinint & pause) { x_pause = pause; };
1871
1873
1877 void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
1878 {
1879 x_file_size = file_size;
1880 if(first_file_size.is_zero())
1881 x_first_file_size = file_size;
1882 else
1883 x_first_file_size = first_file_size;
1884 };
1885
1887
1897 void set_execute(const std::string & execute) { x_execute = execute; };
1898
1900 void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
1901
1904 void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
1905
1907 void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1908
1917 void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1918
1922 void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1923
1925 void set_empty(bool empty) { x_empty = empty; };
1926
1928 void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1929
1931 void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1932
1934 void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1935
1937 void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1938
1942 void set_hash_algo(hash_algo hash);
1943
1945 void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1946
1948 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; };
1949
1951
1954 void set_multi_threaded(bool val) { x_multi_threaded_crypto = 2; x_multi_threaded_compress = 2; };
1955
1957 void set_multi_threaded_crypto(U_I num) { x_multi_threaded_crypto = num; };
1958
1960 void set_multi_threaded_compress(U_I num) { x_multi_threaded_compress = num; };
1961
1963 void set_iteration_count(const infinint & val) { x_iteration_count = val; };
1964
1966 void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
1967
1968
1969
1971 // getting methods
1972
1973 bool get_allow_over() const { return x_allow_over; };
1974 bool get_warn_over() const { return x_warn_over; };
1975 bool get_info_details() const { return x_info_details; };
1976 bool get_display_treated() const { return x_display_treated; };
1977 bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1978 bool get_display_skipped() const { return x_display_skipped; };
1979 bool get_display_finished() const { return x_display_finished; };
1980 const infinint & get_pause() const { return x_pause; };
1981 const infinint & get_slice_size() const { return x_file_size; };
1982 const infinint & get_first_slice_size() const { return x_first_file_size; };
1983 const std::string & get_execute() const { return x_execute; };
1984 crypto_algo get_crypto_algo() const { return x_crypto; };
1985 const secu_string & get_crypto_pass() const { return x_pass; };
1986 U_32 get_crypto_size() const { return x_crypto_size; };
1987 const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1988 const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1989 bool get_empty() const { return x_empty; };
1990 const std::string & get_slice_permission() const { return x_slice_permission; };
1991 const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1992 const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1993 const std::string & get_user_comment() const { return x_user_comment; };
1994 hash_algo get_hash_algo() const { return x_hash; };
1995 infinint get_slice_min_digits() const { return x_slice_min_digits; };
1996 const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1997 U_I get_multi_threaded_crypto() const { return x_multi_threaded_crypto; };
1998 U_I get_multi_threaded_compress() const { return x_multi_threaded_compress; };
1999 const infinint & get_iteration_count() const { return x_iteration_count; };
2000 hash_algo get_kdf_hash() const { return x_kdf_hash; };
2001
2002
2003 private:
2004 bool x_allow_over;
2005 bool x_warn_over;
2006 bool x_info_details;
2007 bool x_display_treated;
2008 bool x_display_treated_only_dir;
2009 bool x_display_skipped;
2010 bool x_display_finished;
2011 infinint x_pause;
2012 infinint x_file_size;
2013 infinint x_first_file_size;
2014 std::string x_execute;
2015 crypto_algo x_crypto;
2016 secu_string x_pass;
2017 U_32 x_crypto_size;
2018 std::vector<std::string> x_gnupg_recipients;
2019 std::vector<std::string> x_gnupg_signatories;
2020 bool x_empty;
2021 std::string x_slice_permission;
2022 std::string x_slice_user_ownership;
2023 std::string x_slice_group_ownership;
2024 std::string x_user_comment;
2025 hash_algo x_hash;
2026 infinint x_slice_min_digits;
2027 std::shared_ptr<entrepot> x_entrepot;
2028 U_I x_multi_threaded_crypto;
2029 U_I x_multi_threaded_compress;
2030 infinint x_iteration_count;
2031 hash_algo x_kdf_hash;
2032
2033 void nullifyptr() noexcept {};
2034 void copy_from(const archive_options_repair & ref);
2035 void move_from(archive_options_repair && ref) noexcept;
2036 };
2037
2039
2040} // end of namespace
2041
2042#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::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:401
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:588
libdar::archive_options_create::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition archive_options.hpp:432
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:394
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:594
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:501
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:370
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:347
libdar::archive_options_create::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition archive_options.hpp:428
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_never_resave_uncompressed
void set_never_resave_uncompressed(bool val)
never try resaving uncompressed when compression ratio is bad
Definition archive_options.hpp:613
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:382
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:527
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:358
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:350
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:425
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:536
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:458
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:515
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:580
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:518
libdar::archive_options_create::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition archive_options.hpp:452
libdar::archive_options_create::set_subtree
void set_subtree(const mask &subtree)
defines the directories and files to consider
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:604
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:530
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:689
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:572
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:512
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:373
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:706
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:548
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:566
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:496
libdar::archive_options_create::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition archive_options.hpp:607
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:376
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:533
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:691
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:577
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:367
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:472
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:690
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:435
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:560
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:461
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:506
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:600
libdar::archive_options_create::set_exclude_by_ea
void set_exclude_by_ea(const std::string &ea_name)
Definition archive_options.hpp:465
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:557
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:521
libdar::archive_options_create::set_compression
void set_compression(compression compr_algo)
set the compression algorithm to be used
Definition archive_options.hpp:379
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:713
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:554
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:509
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:524
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:330
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:481
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:721
libdar::archive_options_create::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition archive_options.hpp:610
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:539
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:364
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:469
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:591
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:446
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:569
libdar::archive_options_create::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition archive_options.hpp:475
libdar::archive_options_extract::set_ea_mask
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to restore
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:1418
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:1447
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:1397
libdar::archive_options_extract::set_info_details
void set_info_details(bool info_details)
Definition archive_options.hpp:1392
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:1406
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:1435
libdar::archive_options_extract::set_dirty_behavior
void set_dirty_behavior(t_dirty val)
alternative method to modify dirty behavior
Definition archive_options.hpp:1427
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:1441
libdar::archive_options_extract::set_subtree
void set_subtree(const mask &subtree)
defines the directories and files to consider
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:1450
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:1412
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:1400
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:1415
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:1384
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:1424
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:1444
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:1409
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:852
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:899
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:800
libdar::archive_options_isolate::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition archive_options.hpp:858
libdar::archive_options_isolate::set_delta_mask
void set_delta_mask(const mask &delta_mask)
whether to derogate from the current existing binary delta signatures and drop/recalculate for file t...
libdar::archive_options_isolate::set_delta_signature
void set_delta_signature(bool val)
whether signature to base binary delta on, has to be transfered from the source to the isolated catal...
Definition archive_options.hpp:906
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:869
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:823
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:806
libdar::archive_options_isolate::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
cypher to use
Definition archive_options.hpp:846
libdar::archive_options_isolate::set_allow_over
void set_allow_over(bool allow_over)
whether overwritting is allowed
Definition archive_options.hpp:797
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:887
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:890
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:924
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:878
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:812
libdar::archive_options_isolate::set_delta_sig_min_size
void set_delta_sig_min_size(const infinint &val)
Definition archive_options.hpp:921
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:896
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:872
libdar::archive_options_isolate::set_execute
void set_execute(const std::string &execute)
command to execute after each slice creation
Definition archive_options.hpp:843
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:809
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:816
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:875
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:902
libdar::archive_options_isolate::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition archive_options.hpp:863
libdar::archive_options_isolate::set_repair_mode
void set_repair_mode(bool mode)
repair mode making at most rebuild a catalog from a truncate or corrupted backup
Definition archive_options.hpp:934
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:884
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:803
libdar::archive_options_isolate::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition archive_options.hpp:930
libdar::archive_options_isolate::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition archive_options.hpp:927
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:849
libdar::archive_options_isolate::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition archive_options.hpp:866
libdar::archive_options_listing::set_subtree
void set_subtree(const mask &subtree)
defines the directories and files to consider
libdar::archive_options_listing::set_display_ea
void set_display_ea(bool display_ea)
whether to fetch EA for listing
Definition archive_options.hpp:1566
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:1551
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:1530
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:1554
libdar::archive_options_merge::set_delta_signature
void set_delta_signature(bool val)
Definition archive_options.hpp:1211
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:1174
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:1081
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:1222
libdar::archive_options_merge::set_empty
void set_empty(bool empty)
defines whether we do a dry-run execution
Definition archive_options.hpp:1156
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:1133
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:1078
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:1204
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:1186
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_never_resave_uncompressed
void set_never_resave_uncompressed(bool val)
never try resaving uncompressed when compression ratio is bad
Definition archive_options.hpp:1231
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:1153
libdar::archive_options_merge::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition archive_options.hpp:1225
libdar::archive_options_merge::set_compression
void set_compression(compression compr_algo)
set the compression algorithm to be used
Definition archive_options.hpp:1090
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:1177
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:1198
libdar::archive_options_merge::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition archive_options.hpp:1129
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:1136
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:1159
libdar::archive_options_merge::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition archive_options.hpp:1142
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:1189
libdar::archive_options_merge::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition archive_options.hpp:1228
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:1072
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:1201
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:1171
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:1126
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:1103
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:1084
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:1087
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:1096
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:1058
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:1219
libdar::archive_options_merge::set_subtree
void set_subtree(const mask &subtree)
defines the directories and files to consider
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:1192
libdar::archive_options_merge::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition archive_options.hpp:1147
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:1168
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:1093
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:1180
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:1162
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:1061
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:1165
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:70
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:117
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:160
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:102
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:204
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:175
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:156
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:105
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:169
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:201
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:225
libdar::archive_options_read::clear
void clear()
reset all the options to their default values
libdar::archive_options_read::set_force_first_slice
void set_force_first_slice(bool val)
whether to ask the first slice in place of the last slice when reading an archive with the help of an...
Definition archive_options.hpp:187
libdar::archive_options_read::set_ignore_signature_check_failure
void set_ignore_signature_check_failure(bool val)
whether to warn (false) or ignore (true) signature failure (default is false, signature failure is re...
Definition archive_options.hpp:163
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:198
libdar::archive_options_read::set_early_memory_release
void set_early_memory_release(bool val)
whether to perform early memory release of the catalogue
Definition archive_options.hpp:184
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:146
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:139
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:178
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:222
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:217
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:123
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:136
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:152
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:108
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:172
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:76
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:193
libdar::archive_options_read::set_silent
void set_silent(bool val)
whether to avoid display message about the fact a wrong key is not possible to detect when reading cy...
Definition archive_options.hpp:181
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:1867
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:1844
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:1960
libdar::archive_options_repair::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
Definition archive_options.hpp:1922
libdar::archive_options_repair::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition archive_options.hpp:1900
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:1945
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:1931
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:1897
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:1928
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:1907
libdar::archive_options_repair::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition archive_options.hpp:1917
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:1855
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:1934
libdar::archive_options_repair::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition archive_options.hpp:1966
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:1870
libdar::archive_options_repair::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition archive_options.hpp:1963
libdar::archive_options_repair::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition archive_options.hpp:1925
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:1957
libdar::archive_options_repair::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition archive_options.hpp:1861
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:1877
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:1864
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:1937
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:1954
libdar::archive_options_repair::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition archive_options.hpp:1904
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:1847
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:1948
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:1777
libdar::archive_options_test::set_subtree
void set_subtree(const mask &subtree)
defines the directories and files to consider
libdar::archive_options_test::set_empty
void set_empty(bool empty)
dry-run exectution if set to true
Definition archive_options.hpp:1785
libdar::archive_options_test::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition archive_options.hpp:1782
libdar::archive_options_test::set_info_details
void set_info_details(bool info_details)
Definition archive_options.hpp:1774
libdar::archive
the archive class realizes the most general operations on archives
Definition archive.hpp:68
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::hash_algo
hash_algo
hashing algorithm available
Definition archive_aux.hpp:63
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition fsa_family.hpp:70
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
libdar::default_iteration_count
const infinint default_iteration_count
default iteration count for all KDF hash algo except argon2
libdar::default_iteration_count_argon2
const infinint default_iteration_count_argon2
default iteration count for argon2 KDF hash
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
my_config.h
include macro defined by the configure script and some specific additional ones
libdar::compile_time::librsync
bool librsync() noexcept
returns whether delta compression is available and delta diff stuff with it
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:50
libdar::delta_sig_block_size::check
void check() const
check the sanity of the provided values