30 #include "../my_config.h"
70 const std::string & basename,
71 const std::string & extension,
97 const path & sauv_path,
98 const std::string & filename,
99 const std::string & extension,
107 const path & sauv_path,
109 const std::string & filename,
110 const std::string & extension,
132 const path & sauv_path,
134 const std::string & filename,
135 const std::string & extension,
213 const path & fs_root,
214 const archive_options_diff & options,
252 const path &sauv_path,
253 const std::string & filename,
254 const std::string & extension,
268 const std::string & dir);
350 enum operation { oper_create, oper_isolate, oper_merge };
356 infinint local_cat_size;
359 bool sequential_read;
360 bool freed_and_checked;
361 std::list<signator> gnupg_signed;
364 void free_except_memory_pool();
367 void check_gnupg_signed(user_interaction & dialog)
const;
369 const catalogue & get_cat()
const {
if(cat ==
nullptr)
throw SRC_BUG;
else return *cat; };
370 const header_version & get_header()
const {
return ver; };
372 bool get_sar_param(infinint & sub_file_size, infinint & first_file_size, infinint & last_file_size,
373 infinint & total_file_number);
374 const entrepot *get_entrepot();
375 infinint get_level2_size();
376 infinint get_cat_size()
const {
return local_cat_size; };
378 statistics op_create_in(user_interaction & dialog,
380 const path & fs_root,
381 const entrepot & sauv_path_t,
383 const mask & selection,
384 const mask & subtree,
385 const std::string & filename,
386 const std::string & extension,
390 bool display_treated,
391 bool display_treated_only_dir,
392 bool display_skipped,
393 bool display_finished,
394 const infinint & pause,
397 U_I compression_level,
398 const infinint & file_size,
399 const infinint & first_file_size,
400 const mask & ea_mask,
401 const std::string & execute,
403 const secu_string & pass,
405 const std::vector<std::string> & gnupg_recipients,
406 const std::vector<std::string> & gnupg_signatories,
407 const mask & compr_mask,
408 const infinint & min_compr_size,
410 const std::string & exclude_by_ea,
411 const infinint & hourshift,
414 bool furtive_read_mode,
418 bool cache_directory_tagging,
419 const infinint & fixed_date,
420 const std::string & slice_permission,
421 const infinint & repeat_count,
422 const infinint & repeat_byte,
423 bool add_marks_for_sequential_reading,
425 const infinint & sparse_file_min_size,
426 const std::string & user_comment,
428 const infinint & slice_min_digits,
429 const std::string & backup_hook_file_execute,
430 const mask & backup_hook_file_mask,
432 const fsa_scope & scope,
434 statistics * progressive_report);
436 void op_create_in_sub(user_interaction & dialog,
438 const path & fs_root,
439 const entrepot & sauv_path_t,
440 const catalogue * ref_cat1,
441 const catalogue * ref_cat2,
443 const mask & selection,
444 const mask & subtree,
445 const std::string & filename,
446 const std::string & extension,
448 const crit_action & overwrite,
451 bool display_treated,
452 bool display_treated_only_dir,
453 bool display_skipped,
454 bool display_finished,
455 const infinint & pause,
458 U_I compression_level,
459 const infinint & file_size,
460 const infinint & first_file_size,
461 const mask & ea_mask,
462 const std::string & execute,
464 const secu_string & pass,
466 const std::vector<std::string> & gnupg_recipients,
467 const std::vector<std::string> & gnupg_signatories,
468 const mask & compr_mask,
469 const infinint & min_compr_size,
471 const std::string & exclude_by_ea,
472 const infinint & hourshift,
475 bool furtive_read_mode,
479 bool cache_directory_tagging,
480 bool keep_compressed,
481 const infinint & fixed_date,
482 const std::string & slice_permission,
483 const infinint & repeat_count,
484 const infinint & repeat_byte,
486 bool add_marks_for_sequential_reading,
488 const infinint & sparse_file_min_size,
489 const std::string & user_comment,
491 const infinint & slice_min_digits,
492 const std::string & backup_hook_file_execute,
493 const mask & backup_hook_file_mask,
495 const fsa_scope & scope,
497 statistics * st_ptr);
499 void disable_natural_destruction();
500 void enable_natural_destruction();
501 const label & get_layer1_data_name()
const;
502 const label & get_catalogue_data_name()
const;
503 bool only_contains_an_isolated_catalogue()
const;
504 void check_against_isolation(user_interaction & dialog,
bool lax)
const;
505 const cat_directory *get_dir_object(
const std::string & dir)
const;
statistics op_extract(user_interaction &dialog, const path &fs_root, const archive_options_extract &options, statistics *progressive_report)
extraction of data from an archive
const catalogue & get_catalogue() const
gives access to internal catalogue (not to be used from the API)
the catalogue class which gather all objects contained in a give archive
holds the statistics contents of a catalogue
bool has_subdirectory(const std::string &dir) const
returns true if the pointed directory has one or more subdirectories
statistics op_diff(user_interaction &dialog, const path &fs_root, const archive_options_diff &options, statistics *progressive_report)
archive comparison with filesystem
const char * dar_gettext(const char *)
a routine to change NLS domaine forth and back for inline routines
class holding optional parameters used to test the structure coherence of an existing archive ...
archive(const archive &ref)
copy constructor (not implemented, throw an exception if called explicitely or implicitely) ...
class of objects describing an entry in the archive, used by archive::get_children_in_table ...
class pile definition. Used to manage a stack of generic_file objects
const entree_stats get_stats() const
retrieving statistics about archive contents
This is a pure virtual class that is used by libdar when interaction with the user is required...
void init_catalogue(user_interaction &dialog) const
the crypto algoritm definition
object describing the slicing of an archive
U_64 get_first_slice_header_size() const
the archive class realizes the most general operations on archives
crypto_algo
the different cypher available for encryption (strong or weak)
const std::vector< list_entry > get_children_in_table(const std::string &dir) const
here is the definition of the path classthe path class handle path and provide several operation on t...
class escape_catalogue definition. Used for sequential writing to archives, as well as several other ...
exception used when a requested feature is not (yet) implemented
handle the statistic structure that gives a summary of treated files after each operatio ...
class escape definition, used for sequential reading of archivesThe class escape is used to insert es...
archive(user_interaction &dialog, const path &chem, const std::string &basename, const std::string &extension, const archive_options_read &options)
this constructor opens an already existing archive (for reading) [this is the "read" constructor] ...
void summary(user_interaction &dialog)
void op_isolate(user_interaction &dialog, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_isolate &options)
this methodes isolates the catalogue of a the current archive into a separated archive ...
contains all the excetion class thrown by libdar
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
compression
the different compression algorithm available
this file contains a set of classes used to transmit options to archive operation ...
bool nodump()
returns whether nodump flag support has been activated at compilation time
void drop_all_filedescriptors()
closes all filedescriptors and associated data, just keep the catalogue
void op_listing(user_interaction &dialog, const archive_options_listing &options)
listing of the archive contents
contains the definition of the scrambler class, a very weak encryption scheme
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 ...
std::string free_and_check_memory() const
comparison_fields
flag used to only consider certain fields when comparing/restoring inodes
void set_to_unsaved_data_and_FSA()
change all inode as unsaved (equal to differential backup with no change met)
const std::list< signator > & get_signatories() const
retrieving signature information about the archive
class holding optional parameters used to read an existing archive
class holding optional parameters used to proceed to the merge operation
U_64 get_non_first_slice_header_size() const
statistics op_test(user_interaction &dialog, const archive_options_test &options, statistics *progressive_report)
test the archive integrity
class holding optional parameters used to create an archive
class holding optional parameters used to isolate an existing archive
libdar namespace encapsulate all libdar symbols
bool get_children_of(user_interaction &dialog, const std::string &dir)
getting information about a given directory
structure returned by libdar call to give a summary of the operation done in term of file treated ...
the class path is here to manipulate paths in the Unix notation: using'/'