26 #ifndef ARCHIVE_OPTIONS_HPP 27 #define ARCHIVE_OPTIONS_HPP 29 #include "../my_config.h" 104 void set_input_pipe(
const std::string & input_pipe) { x_input_pipe = input_pipe; };
110 void set_output_pipe(
const std::string & output_pipe) { x_output_pipe = output_pipe; };
121 void set_execute(
const std::string & execute) { x_execute = execute; };
145 void set_entrepot(
const entrepot & entr) {
if(x_entrepot !=
nullptr)
delete x_entrepot; x_entrepot = entr.clone();
if(x_entrepot ==
nullptr)
throw Ememory(
"archive_options_read::set_entrepot"); };
157 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; };
179 void set_ref_execute(
const std::string & ref_execute) { x_ref_execute = ref_execute; };
187 void set_ref_entrepot(
const entrepot & entr) {
if(x_ref_entrepot !=
nullptr)
delete x_ref_entrepot; x_ref_entrepot = entr.clone();
if(x_ref_entrepot ==
nullptr)
throw Ememory(
"archive_options_read::set_entrepot"); };
198 crypto_algo get_crypto_algo()
const {
return x_crypto; };
199 const secu_string & get_crypto_pass()
const {
return x_pass; };
200 U_32 get_crypto_size()
const {
return x_crypto_size; };
201 const std::string & get_input_pipe()
const {
return x_input_pipe; };
202 const std::string & get_output_pipe()
const {
return x_output_pipe; };
203 const std::string & get_execute()
const {
return x_execute; };
204 bool get_info_details()
const {
return x_info_details; };
205 bool get_lax()
const {
return x_lax; };
206 bool get_sequential_read()
const {
return x_sequential_read; };
207 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
208 const entrepot & get_entrepot()
const {
if(x_entrepot ==
nullptr)
throw SRC_BUG;
return *x_entrepot; };
209 bool get_ignore_signature_check_failure()
const {
return x_ignore_signature_check_failure; };
210 bool get_multi_threaded()
const {
return x_multi_threaded; };
213 bool is_external_catalogue_set()
const {
return external_cat; };
214 const path & get_ref_path()
const;
215 const std::string & get_ref_basename()
const;
216 crypto_algo get_ref_crypto_algo()
const {
return x_ref_crypto; };
217 const secu_string & get_ref_crypto_pass()
const {
return x_ref_pass; };
218 U_32 get_ref_crypto_size()
const {
return x_ref_crypto_size; };
219 const std::string & get_ref_execute()
const {
return x_ref_execute; };
220 infinint get_ref_slice_min_digits()
const {
return x_ref_slice_min_digits; };
221 const entrepot & get_ref_entrepot()
const {
if(x_ref_entrepot ==
nullptr)
throw SRC_BUG;
return *x_ref_entrepot; };
222 bool get_header_only()
const {
return x_header_only; };
229 std::string x_input_pipe;
230 std::string x_output_pipe;
231 std::string x_execute;
234 bool x_sequential_read;
237 bool x_ignore_signature_check_failure;
238 bool x_multi_threaded;
244 std::string x_ref_basename;
247 U_32 x_ref_crypto_size;
248 std::string x_ref_execute;
288 void set_selection(
const mask & selection);
291 void set_subtree(
const mask & subtree);
311 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
338 x_file_size = file_size;
339 if(first_file_size.is_zero())
340 x_first_file_size = file_size;
342 x_first_file_size = first_file_size;
347 void set_ea_mask(
const mask & ea_mask);
350 void set_execute(
const std::string & execute) { x_execute = execute; };
368 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
372 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
375 void set_compr_mask(
const mask & compr_mask);
386 { exclude_by_ea = (ea_name ==
"" ?
"user.libdar_no_backup" : ea_name); };
404 x_old_alter_atime = alter_atime;
406 x_alter_atime = alter_atime;
416 #if FURTIVE_READ_MODE_AVAILABLE 420 x_old_alter_atime = x_alter_atime;
421 x_alter_atime =
true;
425 x_alter_atime = x_old_alter_atime;
429 x_furtive_read =
false;
462 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; };
485 void set_backup_hook(
const std::string & execute,
const mask & which_files);
503 archive *get_reference()
const {
return x_ref_arch; };
504 const mask & get_selection()
const {
if(x_selection ==
nullptr)
throw SRC_BUG;
return *x_selection; };
505 const mask & get_subtree()
const {
if(x_subtree ==
nullptr)
throw SRC_BUG;
return *x_subtree; };
506 bool get_allow_over()
const {
return x_allow_over; };
507 bool get_warn_over()
const {
return x_warn_over; };
508 bool get_info_details()
const {
return x_info_details; };
509 bool get_display_treated()
const {
return x_display_treated; };
510 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
511 bool get_display_skipped()
const {
return x_display_skipped; };
512 bool get_display_finished()
const {
return x_display_finished; };
513 const infinint & get_pause()
const {
return x_pause; };
514 bool get_empty_dir()
const {
return x_empty_dir; };
515 compression get_compression()
const {
return x_compr_algo; };
516 U_I get_compression_level()
const {
return x_compression_level; };
517 const infinint & get_slice_size()
const {
return x_file_size; };
518 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
519 const mask & get_ea_mask()
const {
if(x_ea_mask ==
nullptr)
throw SRC_BUG;
return *x_ea_mask; };
520 const std::string & get_execute()
const {
return x_execute; };
521 crypto_algo get_crypto_algo()
const {
return x_crypto; };
522 const secu_string & get_crypto_pass()
const {
return x_pass; };
523 U_32 get_crypto_size()
const {
return x_crypto_size; };
524 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
525 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
526 const mask & get_compr_mask()
const {
if(x_compr_mask ==
nullptr)
throw SRC_BUG;
return *x_compr_mask; };
527 const infinint & get_min_compr_size()
const {
return x_min_compr_size; };
528 bool get_nodump()
const {
return x_nodump; };
529 const std::string & get_exclude_by_ea()
const {
return exclude_by_ea; };
531 const infinint & get_hourshift()
const {
return x_hourshift; };
532 bool get_empty()
const {
return x_empty; };
533 bool get_alter_atime()
const {
return x_alter_atime; };
534 bool get_furtive_read_mode()
const {
return x_furtive_read; };
535 bool get_same_fs()
const {
return x_same_fs; };
536 bool get_snapshot()
const {
return x_snapshot; };
537 bool get_cache_directory_tagging()
const {
return x_cache_directory_tagging; };
538 const infinint & get_fixed_date()
const {
return x_fixed_date; };
539 const std::string & get_slice_permission()
const {
return x_slice_permission; };
540 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
541 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
542 const infinint & get_repeat_count()
const {
return x_repeat_count; };
543 const infinint & get_repeat_byte()
const {
return x_repeat_byte; };
544 bool get_sequential_marks()
const {
return x_sequential_marks; };
545 infinint get_sparse_file_min_size()
const {
return x_sparse_file_min_size; };
546 bool get_security_check()
const {
return x_security_check; };
547 const std::string & get_user_comment()
const {
return x_user_comment; };
548 hash_algo get_hash_algo()
const {
return x_hash; };
549 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
550 const std::string & get_backup_hook_file_execute()
const {
return x_backup_hook_file_execute; };
551 const mask & get_backup_hook_file_mask()
const {
return *x_backup_hook_file_mask; };
552 bool get_ignore_unknown_inode_type()
const {
return x_ignore_unknown; };
553 const entrepot & get_entrepot()
const {
if(x_entrepot ==
nullptr)
throw SRC_BUG;
return *x_entrepot; };
554 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
555 bool get_multi_threaded()
const {
return x_multi_threaded; };
564 bool x_display_treated;
565 bool x_display_treated_only_dir;
566 bool x_display_skipped;
567 bool x_display_finished;
571 U_I x_compression_level;
575 std::string x_execute;
579 std::vector<std::string> x_gnupg_recipients;
580 std::vector<std::string> x_gnupg_signatories;
584 std::string exclude_by_ea;
589 bool x_old_alter_atime;
593 bool x_cache_directory_tagging;
595 std::string x_slice_permission;
596 std::string x_slice_user_ownership;
597 std::string x_slice_group_ownership;
600 bool x_sequential_marks;
602 bool x_security_check;
603 std::string x_user_comment;
606 mask * x_backup_hook_file_mask;
607 std::string x_backup_hook_file_execute;
608 bool x_ignore_unknown;
611 bool x_multi_threaded;
615 void destroy_mask(
mask * & ptr);
616 void clean_mask(
mask * & ptr);
617 void check_mask(
const mask & m);
669 x_file_size = file_size;
670 if(first_file_size.is_zero())
671 x_first_file_size = file_size;
673 x_first_file_size = first_file_size;
677 void set_execute(
const std::string & execute) { x_execute = execute; };
690 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
693 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
729 bool get_allow_over()
const {
return x_allow_over; };
730 bool get_warn_over()
const {
return x_warn_over; };
731 bool get_info_details()
const {
return x_info_details; };
732 const infinint & get_pause()
const {
return x_pause; };
733 compression get_compression()
const {
return x_algo; };
734 U_I get_compression_level()
const {
return x_compression_level; };
735 const infinint & get_slice_size()
const {
return x_file_size; };
736 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
737 const std::string & get_execute()
const {
return x_execute; };
738 crypto_algo get_crypto_algo()
const {
return x_crypto; };
739 const secu_string & get_crypto_pass()
const {
return x_pass; };
740 U_32 get_crypto_size()
const {
return x_crypto_size; };
741 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
742 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
743 bool get_empty()
const {
return x_empty; };
744 const std::string & get_slice_permission()
const {
return x_slice_permission; };
745 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
746 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
747 const std::string & get_user_comment()
const {
return x_user_comment; };
748 hash_algo get_hash_algo()
const {
return x_hash; };
749 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
750 bool get_sequential_marks()
const {
return x_sequential_marks; };
751 const entrepot & get_entrepot()
const {
if(x_entrepot ==
nullptr)
throw SRC_BUG;
return *x_entrepot; };
752 bool get_multi_threaded()
const {
return x_multi_threaded; };
761 U_I x_compression_level;
764 std::string x_execute;
768 std::vector<std::string> x_gnupg_recipients;
769 std::vector<std::string> x_gnupg_signatories;
771 std::string x_slice_permission;
772 std::string x_slice_user_ownership;
773 std::string x_slice_group_ownership;
774 std::string x_user_comment;
777 bool x_sequential_marks;
779 bool x_multi_threaded;
796 archive_options_merge() { x_selection = x_subtree = x_ea_mask = x_compr_mask =
nullptr; x_overwrite =
nullptr; x_entrepot =
nullptr;
clear(); };
806 void set_auxilliary_ref(
archive *ref) { x_ref = ref; };
809 void set_selection(
const mask & selection);
812 void set_subtree(
const mask & subtree);
821 void set_overwriting_rules(
const crit_action & overwrite);
835 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
859 x_file_size = file_size;
860 if(first_file_size.is_zero())
861 x_first_file_size = file_size;
863 x_first_file_size = first_file_size;
867 void set_ea_mask(
const mask & ea_mask);
870 void set_execute(
const std::string & execute) { x_execute = execute; };
884 void set_gnupg_recipients(
const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
887 void set_gnupg_signatories(
const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
890 void set_compr_mask(
const mask & compr_mask);
941 archive * get_auxilliary_ref()
const {
return x_ref; };
942 const mask & get_selection()
const {
if(x_selection ==
nullptr)
throw SRC_BUG;
return *x_selection; };
943 const mask & get_subtree()
const {
if(x_subtree ==
nullptr)
throw SRC_BUG;
return *x_subtree; };
944 bool get_allow_over()
const {
return x_allow_over; };
945 bool get_warn_over()
const {
return x_warn_over; };
946 const crit_action & get_overwriting_rules()
const {
if(x_overwrite ==
nullptr)
throw SRC_BUG;
return *x_overwrite; };
947 bool get_info_details()
const {
return x_info_details; };
948 bool get_display_treated()
const {
return x_display_treated; };
949 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
950 bool get_display_skipped()
const {
return x_display_skipped; };
951 const infinint & get_pause()
const {
return x_pause; };
952 bool get_empty_dir()
const {
return x_empty_dir; };
953 compression get_compression()
const {
return x_compr_algo; };
954 U_I get_compression_level()
const {
return x_compression_level; };
955 const infinint & get_slice_size()
const {
return x_file_size; };
956 const infinint & get_first_slice_size()
const {
return x_first_file_size; };
957 const mask & get_ea_mask()
const {
if(x_ea_mask ==
nullptr)
throw SRC_BUG;
return *x_ea_mask; };
958 const std::string & get_execute()
const {
return x_execute; };
959 crypto_algo get_crypto_algo()
const {
return x_crypto; };
960 const secu_string & get_crypto_pass()
const {
return x_pass; };
961 U_32 get_crypto_size()
const {
return x_crypto_size; };
962 const std::vector<std::string> & get_gnupg_recipients()
const {
return x_gnupg_recipients; };
963 const std::vector<std::string> & get_gnupg_signatories()
const {
return x_gnupg_signatories; };
964 const mask & get_compr_mask()
const {
if(x_compr_mask ==
nullptr)
throw SRC_BUG;
return *x_compr_mask; };
965 const infinint & get_min_compr_size()
const {
return x_min_compr_size; };
966 bool get_empty()
const {
return x_empty; };
967 bool get_keep_compressed()
const {
return x_keep_compressed; };
968 const std::string & get_slice_permission()
const {
return x_slice_permission; };
969 const std::string & get_slice_user_ownership()
const {
return x_slice_user_ownership; };
970 const std::string & get_slice_group_ownership()
const {
return x_slice_group_ownership; };
971 bool get_decremental_mode()
const {
return x_decremental; };
972 bool get_sequential_marks()
const {
return x_sequential_marks; };
973 infinint get_sparse_file_min_size()
const {
return x_sparse_file_min_size; };
974 const std::string & get_user_comment()
const {
return x_user_comment; };
975 hash_algo get_hash_algo()
const {
return x_hash; };
976 infinint get_slice_min_digits()
const {
return x_slice_min_digits; };
977 const entrepot & get_entrepot()
const {
if(x_entrepot ==
nullptr)
throw SRC_BUG;
return *x_entrepot; };
978 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
979 bool get_multi_threaded()
const {
return x_multi_threaded; };
989 bool x_display_treated;
990 bool x_display_treated_only_dir;
991 bool x_display_skipped;
995 U_I x_compression_level;
999 std::string x_execute;
1003 std::vector<std::string> x_gnupg_recipients;
1004 std::vector<std::string> x_gnupg_signatories;
1005 mask * x_compr_mask;
1008 bool x_keep_compressed;
1009 std::string x_slice_permission;
1010 std::string x_slice_user_ownership;
1011 std::string x_slice_group_ownership;
1013 bool x_sequential_marks;
1015 std::string x_user_comment;
1020 bool x_multi_threaded;
1035 enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1048 void set_selection(
const mask & selection);
1051 void set_subtree(
const mask & subtree);
1067 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1073 void set_ea_mask(
const mask & ea_mask);
1094 void set_dirty_behavior(
bool ignore,
bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1100 void set_overwriting_rules(
const crit_action & over);
1120 const mask & get_selection()
const {
if(x_selection ==
nullptr)
throw SRC_BUG;
return *x_selection; };
1121 const mask & get_subtree()
const {
if(x_subtree ==
nullptr)
throw SRC_BUG;
return *x_subtree; };
1122 bool get_warn_over()
const {
return x_warn_over; };
1123 bool get_info_details()
const {
return x_info_details; };
1124 bool get_display_treated()
const {
return x_display_treated; };
1125 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1126 bool get_display_skipped()
const {
return x_display_skipped; };
1127 const mask & get_ea_mask()
const {
if(x_ea_mask ==
nullptr)
throw SRC_BUG;
return *x_ea_mask; };
1128 bool get_flat()
const {
return x_flat; };
1130 bool get_warn_remove_no_match()
const {
return x_warn_remove_no_match; };
1131 bool get_empty()
const {
return x_empty; };
1132 bool get_empty_dir()
const {
return x_empty_dir; };
1133 t_dirty get_dirty_behavior()
const {
return x_dirty; }
1134 const crit_action & get_overwriting_rules()
const {
if(x_overwrite ==
nullptr)
throw SRC_BUG;
return *x_overwrite; };
1135 bool get_only_deleted()
const {
return x_only_deleted; };
1136 bool get_ignore_deleted()
const {
return x_ignore_deleted; };
1137 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1143 bool x_info_details;
1144 bool x_display_treated;
1145 bool x_display_treated_only_dir;
1146 bool x_display_skipped;
1150 bool x_warn_remove_no_match;
1155 bool x_only_deleted;
1156 bool x_ignore_deleted;
1194 void set_info_details(
bool info_details) { x_info_details = info_details; };
1195 void set_list_mode(
listformat list_mode) { x_list_mode = list_mode; };
1196 void set_selection(
const mask & selection);
1197 void set_subtree(
const mask & subtree);
1198 void set_filter_unsaved(
bool filter_unsaved) { x_filter_unsaved = filter_unsaved; };
1199 void set_display_ea(
bool display_ea) { x_display_ea = display_ea; };
1200 void set_user_slicing(
const infinint & slicing_first,
const infinint & slicing_others);
1201 void set_sizes_in_bytes(
bool arg) { x_sizes_in_bytes = arg; };
1206 bool get_info_details()
const {
return x_info_details; };
1207 listformat get_list_mode()
const {
return x_list_mode; };
1208 const mask & get_selection()
const;
1209 const mask & get_subtree()
const;
1210 bool get_filter_unsaved()
const {
return x_filter_unsaved; };
1211 bool get_display_ea()
const {
return x_display_ea; };
1212 bool get_user_slicing(
infinint & slicing_first,
infinint & slicing_others)
const;
1213 bool get_sizes_in_bytes()
const {
return x_sizes_in_bytes; };
1216 bool x_info_details;
1220 bool x_filter_unsaved;
1224 bool x_sizes_in_bytes;
1236 class archive_options_diff :
public on_pool 1239 archive_options_diff() { x_selection = x_subtree = x_ea_mask =
nullptr;
clear(); };
1240 archive_options_diff(
const archive_options_diff & ref) { copy_from(ref); };
1241 const archive_options_diff & operator = (
const archive_options_diff & ref) { destroy(); copy_from(ref);
return *
this; };
1242 ~archive_options_diff() { destroy(); };
1250 void set_selection(
const mask & selection);
1253 void set_subtree(
const mask & subtree);
1261 void set_info_details(
bool info_details) { x_info_details = info_details; };
1266 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1269 void set_display_skipped(
bool display_skipped) { x_display_skipped = display_skipped; };
1272 void set_ea_mask(
const mask & ea_mask);
1281 void set_alter_atime(
bool alter_atime)
1284 x_old_alter_atime = alter_atime;
1286 x_alter_atime = alter_atime;
1293 void set_hourshift(
const infinint & hourshift) { x_hourshift = hourshift; };
1296 void set_compare_symlink_date(
bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1299 void set_fsa_scope(
const fsa_scope & scope) { x_scope = scope; };
1305 const mask & get_selection()
const {
if(x_selection ==
nullptr)
throw SRC_BUG;
return *x_selection; };
1306 const mask & get_subtree()
const {
if(x_subtree ==
nullptr)
throw SRC_BUG;
return *x_subtree; };
1307 bool get_info_details()
const {
return x_info_details; };
1308 bool get_display_treated()
const {
return x_display_treated; };
1309 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1310 bool get_display_skipped()
const {
return x_display_skipped; };
1311 const mask & get_ea_mask()
const {
if(x_ea_mask ==
nullptr)
throw SRC_BUG;
return *x_ea_mask; };
1313 bool get_alter_atime()
const {
return x_alter_atime; };
1314 bool get_furtive_read_mode()
const {
return x_furtive_read; };
1315 const infinint & get_hourshift()
const {
return x_hourshift; };
1316 bool get_compare_symlink_date()
const {
return x_compare_symlink_date; };
1317 const fsa_scope & get_fsa_scope()
const {
return x_scope; };
1322 bool x_info_details;
1323 bool x_display_treated;
1324 bool x_display_treated_only_dir;
1325 bool x_display_skipped;
1329 bool x_old_alter_atime;
1330 bool x_furtive_read;
1332 bool x_compare_symlink_date;
1336 void copy_from(
const archive_options_diff & ref);
1361 void set_selection(
const mask & selection);
1364 void set_subtree(
const mask & subtree);
1380 void set_display_treated(
bool display_treated,
bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1389 const mask & get_selection()
const {
if(x_selection ==
nullptr)
throw SRC_BUG;
return *x_selection; };
1390 const mask & get_subtree()
const {
if(x_subtree ==
nullptr)
throw SRC_BUG;
return *x_subtree; };
1391 bool get_info_details()
const {
return x_info_details; };
1392 bool get_display_treated()
const {
return x_display_treated; };
1393 bool get_display_treated_only_dir()
const {
return x_display_treated_only_dir; };
1394 bool get_display_skipped()
const {
return x_display_skipped; };
1395 bool get_empty()
const {
return x_empty; };
1400 bool x_info_details;
1401 bool x_display_treated;
1402 bool x_display_treated_only_dir;
1403 bool x_display_skipped;
contains classes that let the user define the policy for overwriting files
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA are considered) ...
defines the entrepot interface. Entrepot interface defines a generic way to interact with files (slic...
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_external_catalogue(const path &ref_chem, const std::string &ref_basename)
defines whether or not to use the catalogue from an extracted catalogue (instead of the one embedded ...
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_alter_atime(bool alter_atime)
whether to alter atime or ctime in the filesystem when reading files to save
filesystem specific attributes available families and fsa_scope definition
the generic class, parent of all masks
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_multi_threaded(bool val)
whether libdar is allowed to create several thread to work possilbiy faster on multicore CPU (need li...
void set_display_treated(bool display_treated, bool only_dir)
bool furtive_read()
returns whether libdar can support furtive read mode when run by privileged user
void set_crypto_algo(crypto_algo crypto)
cypher to use
are defined here basic integer types that tend to be portable
void set_ignore_unknown_inode_type(bool val)
whether to ignore unknown inode types instead of issuing a warning
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
void set_sequential_marks(bool sequential)
whether to activate escape sequence aka tape marks to allow sequential reading of the archive ...
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_crypto_pass(const secu_string &pass)
void set_crypto_size(U_32 crypto_size)
the encryption block size to use to decrypt
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
void set_decremental_mode(bool mode)
if set to true use a merging mode suitable to build a decremental backup from two full backups (see N...
void set_execute(const std::string &execute)
set the command to execute before reading each slice (empty string for no script) ...
void set_header_only(bool val)
whether we only read the archive header and exit
void set_empty(bool empty)
whether to make a dry-run operation
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
archive_options_read(const archive_options_read &ref)
the copy constructor, assignment operator and destructor
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
exception used when a requested fearture has not beed activated at compilation time ...
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
void set_fixed_date(const infinint &fixed_date)
whether to ignore any archive of reference and only save file which modification is more recent that ...
class holding optional parameters used to test the structure coherence of an existing archive ...
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive ...
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_execute(const std::string &execute)
set the command to execute after each slice creation
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_default_crypto_size()
set the encryption block size to the default value
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_exclude_by_ea(const std::string &ea_name)
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
archive_options_read()
build an object and set options to their default values
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
void clear()
reset all the options to their default values
void set_hourshift(const infinint &hourshift)
ignore differences of at most this integer number of hours while looking for changes in dates ...
void set_reference(archive *ref_arch)
set the archive to take as reference (nullptr for a full backup)
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
void set_crypto_pass(const secu_string &pass)
defines the password or passphrase to decrypt (unused if encryption is not set)
void set_furtive_read_mode(bool furtive_read)
whether to use furtive read mode (if activated, alter_atime() has no meaning/use) ...
void set_pause(const infinint &pause)
Pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each slice...
the crypto algoritm definition
void set_entrepot(const entrepot &entr)
defines the protocol to use to retrieve slices
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_ref_entrepot(const entrepot &entr)
defines the protocol to use to retrieve slices of the reference archive (where the external catalogue...
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio...
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
void set_allow_over(bool allow_over)
whether overwritting is allowed
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_info_details(bool info_details)
whether the user needs detailed output of the operation
void set_ignore_signature_check_failure(bool val)
whether to warn (true) or ignore (false) signature failure (default is true)
void set_empty(bool empty)
whether to make a dry-run operation
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_compression(compression algo)
the compression algorithm used
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
void set_empty(bool empty)
dry-run exectution if set to true
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive ...
the archive class realizes the most general operations on archives
void set_snapshot(bool snapshot)
whether to make an emtpy archive only referencing the current state of files in the filesystem ...
void set_ref_crypto_size(U_32 ref_crypto_size)
defines the crypto size for the reference catalogue
void set_empty(bool empty)
defines whether we do a dry-run execution
void set_same_fs(bool same_fs)
whether to limit the backup to files located on the same filesystem as the directory taken as root of...
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
void set_crypto_pass(const secu_string &pass)
password / passphrase to encrypt the data with (empty string for interactive question) ...
exception used when memory has been exhausted
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
void set_ref_crypto_pass(const secu_string &ref_pass)
defines the pass for the reference catalogue
void set_compression_level(U_I compression_level)
the compression level (from 1 to 9)
listformat
defines the way archive listing is done:
void set_keep_compressed(bool keep_compressed)
make dar ignore the 'algo' argument and do not uncompress / compress files that are selected for merg...
the global action for overwriting
void set_crypto_size(U_32 crypto_size)
size of the encryption by block to use
void set_info_details(bool info_details)
void set_warn_over(bool warn_over)
whether a warning shall be issued before overwriting
void set_compression(compression compr_algo)
set the compression algorithm to be used
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
void set_cache_directory_tagging(bool cache_directory_tagging)
whether to consider the Cache Directory Tagging Standard
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...
class hash_fichier definition.This is an inherited class from class fichier Objects of that class are...
void set_info_details(bool info_details)
here lies a collection of mask classes
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
void set_what_to_check(cat_inode::comparison_fields what_to_check)
set the fields to consider when comparing inodes with reference archive (see cat_inode::comparison_fi...
void set_hash_algo(hash_algo hash)
void set_compression(compression compr_algo)
set the compression algorithm to be used
void set_retry_on_change(const infinint &count_max_per_file, const infinint &global_max_byte_overhead=0)
how much time to retry saving a file if it changed while being read
void set_crypto_pass(const secu_string &pass)
void set_ref_slice_min_digits(infinint val)
defines the minim digit for slice number of the archive of reference (where the external catalogue is...
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
compression
the different compression algorithm available
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 "-")
provides a set of macro to change the NLS from user application domaine to libdar domain and vicevers...
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key ...
bool nodump()
returns whether nodump flag support has been activated at compilation time
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
void set_execute(const std::string &execute)
command to execute after each slice creation
compression engine implementation
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
void set_ref_crypto_algo(crypto_algo ref_crypto)
defines the crypto algo for the reference catalogue
void set_display_treated(bool display_treated, bool only_dir)
this is the base class of object that can be allocated on a memory pool
class holding optional parameters used to list the contents of an existing archive ...
void set_info_details(bool info_details)
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
the arbitrary large positive integer class
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
void unset_external_catalogue()
clear any reference to an external catalogue
void set_crypto_algo(crypto_algo val)
void set_ref_execute(const std::string &ref_execute)
set the command to execute before reading each slice of the reference catalogue
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
void set_multi_threaded(bool val)
whether libdar is allowed to created several thread to work possibily faster on multicore CPU (requir...
class holding optional parameters used to read an existing archive
class holding optional parameters used to proceed to the merge operation
void set_output_pipe(const std::string &output_pipe)
set the name of the output pipe to send orders to (when basenale is set to "-")
void set_security_check(bool check)
whether to check for ctime changes since with the archive of reference
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
class holding optional parameters used to create an archive
void set_nodump(bool nodump)
defines whether to ignore files with the nodump flag set
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
class holding optional parameters used to isolate an existing archive
libdar namespace encapsulate all libdar symbols
comparison_fields
flag used to only consider certain fields when comparing/restoring inodes
void set_display_treated(bool display_treated, bool only_dir)
void set_lax(bool val)
defines whether any archive coherence error, system error or media error lead to the abortion of the ...
here is defined the many classed which is build of the catalogue
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
void set_sequential_read(bool val)
defines whether to try reading the archive sequentially (ala tar) or using the final catalogue ...
the class path is here to manipulate paths in the Unix notation: using'/'
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)