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);
334 enum operation { oper_create, oper_isolate, oper_merge };
340 infinint local_cat_size;
343 bool sequential_read;
344 bool freed_and_checked;
345 std::list<signator> gnupg_signed;
348 void free_except_memory_pool();
351 void check_gnupg_signed(user_interaction & dialog)
const;
353 const catalogue & get_cat()
const {
if(cat ==
nullptr)
throw SRC_BUG;
else return *cat; };
354 const header_version & get_header()
const {
return ver; };
356 bool get_sar_param(infinint & sub_file_size, infinint & first_file_size, infinint & last_file_size,
357 infinint & total_file_number);
358 const entrepot *get_entrepot();
359 infinint get_level2_size();
360 infinint get_cat_size()
const {
return local_cat_size; };
362 statistics op_create_in(user_interaction & dialog,
364 const path & fs_root,
365 const entrepot & sauv_path_t,
367 const mask & selection,
368 const mask & subtree,
369 const std::string & filename,
370 const std::string & extension,
374 bool display_treated,
375 bool display_treated_only_dir,
376 bool display_skipped,
377 bool display_finished,
378 const infinint & pause,
381 U_I compression_level,
382 const infinint & file_size,
383 const infinint & first_file_size,
384 const mask & ea_mask,
385 const std::string & execute,
387 const secu_string & pass,
389 const std::vector<std::string> & gnupg_recipients,
390 const std::vector<std::string> & gnupg_signatories,
391 const mask & compr_mask,
392 const infinint & min_compr_size,
394 const std::string & exclude_by_ea,
395 const infinint & hourshift,
398 bool furtive_read_mode,
402 bool cache_directory_tagging,
403 const infinint & fixed_date,
404 const std::string & slice_permission,
405 const infinint & repeat_count,
406 const infinint & repeat_byte,
407 bool add_marks_for_sequential_reading,
409 const infinint & sparse_file_min_size,
410 const std::string & user_comment,
412 const infinint & slice_min_digits,
413 const std::string & backup_hook_file_execute,
414 const mask & backup_hook_file_mask,
416 const fsa_scope & scope,
418 statistics * progressive_report);
420 void op_create_in_sub(user_interaction & dialog,
422 const path & fs_root,
423 const entrepot & sauv_path_t,
424 const catalogue * ref_cat1,
425 const catalogue * ref_cat2,
427 const mask & selection,
428 const mask & subtree,
429 const std::string & filename,
430 const std::string & extension,
432 const crit_action & overwrite,
435 bool display_treated,
436 bool display_treated_only_dir,
437 bool display_skipped,
438 bool display_finished,
439 const infinint & pause,
442 U_I compression_level,
443 const infinint & file_size,
444 const infinint & first_file_size,
445 const mask & ea_mask,
446 const std::string & execute,
448 const secu_string & pass,
450 const std::vector<std::string> & gnupg_recipients,
451 const std::vector<std::string> & gnupg_signatories,
452 const mask & compr_mask,
453 const infinint & min_compr_size,
455 const std::string & exclude_by_ea,
456 const infinint & hourshift,
459 bool furtive_read_mode,
463 bool cache_directory_tagging,
464 bool keep_compressed,
465 const infinint & fixed_date,
466 const std::string & slice_permission,
467 const infinint & repeat_count,
468 const infinint & repeat_byte,
470 bool add_marks_for_sequential_reading,
472 const infinint & sparse_file_min_size,
473 const std::string & user_comment,
475 const infinint & slice_min_digits,
476 const std::string & backup_hook_file_execute,
477 const mask & backup_hook_file_mask,
479 const fsa_scope & scope,
481 statistics * st_ptr);
483 void disable_natural_destruction();
484 void enable_natural_destruction();
485 const label & get_layer1_data_name()
const;
486 const label & get_catalogue_data_name()
const;
487 bool only_contains_an_isolated_catalogue()
const;
488 void check_against_isolation(user_interaction & dialog,
bool lax)
const;
489 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
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
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'/'