Disk ARchive  2.7.14
Full featured and portable backup and archiving tool
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
libdar::archive::i_archive Class Reference

the archive::i_archive class implements the most general operations on archives More...

#include <i_archive.hpp>

+ Inheritance diagram for libdar::archive::i_archive:
+ Collaboration diagram for libdar::archive::i_archive:

Public Member Functions

 i_archive (const std::shared_ptr< 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]
 
 i_archive (const std::shared_ptr< user_interaction > &dialog, const path &fs_root, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_create &options, statistics *progressive_report)
 this constuctor create an archive (full or differential) [this is the "create" constructor]
 
 i_archive (const std::shared_ptr< user_interaction > &dialog, const path &sauv_path, std::shared_ptr< archive > ref_arch1, const std::string &filename, const std::string &extension, const archive_options_merge &options, statistics *progressive_report)
 this constructor builds an archive from two given archive [this is the "merge" constructor]
 
 i_archive (const std::shared_ptr< user_interaction > &dialog, const path &chem_src, const std::string &basename_src, const std::string &extension_src, const archive_options_read &options_read, const path &chem_dst, const std::string &basename_dst, const std::string &extension_dst, const archive_options_repair &options_repair)
 this constructor create a new archive from a damaged one [this is the "repair" constructor]
 
 i_archive (const i_archive &ref)=delete
 copy constructor (not implemented, throw an exception if called explicitely or implicitely)
 
 i_archive (i_archive &&ref)=delete
 
i_archiveoperator= (const i_archive &ref)=delete
 
i_archiveoperator= (i_archive &&ref)=delete
 
 ~i_archive ()
 the destructor
 
statistics op_extract (const path &fs_root, const archive_options_extract &options, statistics *progressive_report)
 extraction of data from an archive
 
void summary ()
 display a summary of the archive
 
archive_summary summary_data ()
 same information as summary() but as broken out data
 
void op_listing (archive_listing_callback callback, void *context, const archive_options_listing &options) const
 listing of the archive contents
 
statistics op_diff (const path &fs_root, const archive_options_diff &options, statistics *progressive_report)
 archive comparison with filesystem
 
statistics op_test (const archive_options_test &options, statistics *progressive_report)
 test the archive integrity
 
void op_isolate (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
 
bool get_children_of (archive_listing_callback callback, void *context, const std::string &dir, bool fetch_ea=false)
 getting information about a given directory
 
const std::vector< list_entryget_children_in_table (const std::string &dir, bool fetch_ea=false) const
 getting information about the given directory (alternative to get_children_of)
 
bool has_subdirectory (const std::string &dir) const
 returns true if the pointed directory has one or more subdirectories
 
const entree_stats get_stats () const
 retrieving statistics about archive contents
 
const std::list< signator > & get_signatories () const
 retrieving signature information about the archive
 
void init_catalogue () const
 
const catalogueget_catalogue () const
 gives access to internal catalogue (not to be used from the API)
 
void drop_all_filedescriptors ()
 closes all filedescriptors and associated even when in sequential read mode
 
void set_to_unsaved_data_and_FSA ()
 change all inode as unsaved (equal to differential backup with no change met)
 
bool get_catalogue_slice_layout (slice_layout &slicing) const
 returns the slice layout of the archive, or of the archive of reference in case of isolated catalogue
 
U_64 get_first_slice_header_size () const
 get the first slice header
 
U_64 get_non_first_slice_header_size () const
 get the non first slice header
 
- Public Member Functions inherited from libdar::mem_ui
 mem_ui (const std::shared_ptr< user_interaction > &dialog)
 constructor More...
 
 mem_ui (const mem_ui &ref)=default
 the copy constructor More...
 
 mem_ui (mem_ui &&ref) noexcept=default
 the move constructor
 
mem_uioperator= (const mem_ui &ref)=default
 assignement operator More...
 
mem_uioperator= (mem_ui &&ref) noexcept=default
 move operator
 
virtual ~mem_ui () noexcept(false)
 destructor More...
 

Private Types

enum  operation { oper_create , oper_isolate , oper_merge , oper_repair }
 

Private Member Functions

void free_mem ()
 
void check_gnupg_signed () const
 
const catalogueget_cat () const
 
const header_versionget_header () const
 
bool get_sar_param (infinint &sub_file_size, infinint &first_file_size, infinint &last_file_size, infinint &total_file_number)
 
std::shared_ptr< entrepotget_entrepot ()
 this method may return nullptr if no entrepot is used (pipes used for archive building, etc.)
 
infinint get_level2_size ()
 
infinint get_cat_size () const
 
statistics op_create_in (operation op, const path &fs_root, const std::shared_ptr< entrepot > &sauv_path_t, archive *ref_arch, const mask &selection, const mask &subtree, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, bool display_finished, const infinint &pause, bool empty_dir, compression algo, U_I compression_level, U_I compression_block_size, const infinint &file_size, const infinint &first_file_size, const mask &ea_mask, const std::string &execute, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, const mask &compr_mask, const infinint &min_compr_size, bool nodump, const std::string &exclude_by_ea, const infinint &hourshift, bool empty, bool alter_atime, bool furtive_read_mode, const filesystem_ids &same_fs, comparison_fields what_to_check, bool snapshot, bool cache_directory_tagging, const infinint &fixed_date, const std::string &slice_permission, const infinint &repeat_count, const infinint &repeat_byte, bool add_marks_for_sequential_reading, bool security_check, const infinint &sparse_file_min_size, const std::string &user_comment, hash_algo hash, const infinint &slice_min_digits, const std::string &backup_hook_file_execute, const mask &backup_hook_file_mask, bool ignore_unknown, const fsa_scope &scope, U_I multi_threaded_crypto, U_I multi_threaded_compress, bool delta_signature, bool build_delta_sig, const mask &delta_mask, const infinint &delta_sig_min_size, bool delta_diff, bool zeroing_neg_date, const std::set< std::string > &ignored_symlinks, modified_data_detection mod_data_detect, const infinint &iteration_count, hash_algo kdf_hash, const delta_sig_block_size &sig_block_len, statistics *progressive_report)
 
void op_create_in_sub (operation op, const path &fs_root, const std::shared_ptr< entrepot > &sauv_path_t, catalogue *ref_cat1, const catalogue *ref_cat2, bool initial_pause, const mask &selection, const mask &subtree, const std::string &filename, const std::string &extension, bool allow_over, const crit_action &overwrite, bool warn_over, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, bool display_finished, const infinint &pause, bool empty_dir, compression algo, U_I compression_level, U_I compression_block_size, const infinint &file_size, const infinint &first_file_size, const mask &ea_mask, const std::string &execute, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, const mask &compr_mask, const infinint &min_compr_size, bool nodump, const std::string &exclude_by_ea, const infinint &hourshift, bool empty, bool alter_atime, bool furtive_read_mode, const filesystem_ids &same_fs, comparison_fields what_to_check, bool snapshot, bool cache_directory_tagging, bool keep_compressed, const infinint &fixed_date, const std::string &slice_permission, const infinint &repeat_count, const infinint &repeat_byte, bool decremental, bool add_marks_for_sequential_reading, bool security_check, const infinint &sparse_file_min_size, const std::string &user_comment, hash_algo hash, const infinint &slice_min_digits, const std::string &backup_hook_file_execute, const mask &backup_hook_file_mask, bool ignore_unknown, const fsa_scope &scope, U_I multi_threaded_crypto, U_I multi_threaded_compress, bool delta_signature, bool build_delta_sig, const mask &delta_mask, const infinint &delta_sig_min_size, bool delta_diff, bool zeroing_neg_date, const std::set< std::string > &ignored_symlinks, modified_data_detection mod_data_detect, const infinint &iteration_count, hash_algo kdf_hash, const delta_sig_block_size &sign_block_len, statistics *st_ptr)
 
void disable_natural_destruction ()
 
void enable_natural_destruction ()
 
const labelget_layer1_data_name () const
 
const labelget_catalogue_data_name () const
 
bool only_contains_an_isolated_catalogue () const
 true if the current archive only contains an isolated catalogue
 
void check_against_isolation (bool lax) const
 throw Erange exception if the archive only contains an isolated catalogue
 
const cat_directoryget_dir_object (const std::string &dir) const
 
void load_catalogue ()
 

Private Attributes

pile stack
 the different layer through which the archive contents is read or wrote
 
header_version ver
 information for the archive header
 
cataloguecat
 archive contents
 
infinint local_cat_size
 size of the catalogue on disk
 
bool exploitable
 is false if only the catalogue is available (for reference backup or isolation).
 
bool lax_read_mode
 whether the archive has been openned in lax mode (unused for creation/merging/isolation)
 
bool sequential_read
 whether the archive is read in sequential mode
 
std::list< signatorgnupg_signed
 list of signature found in the archive (reading an existing archive)
 
slice_layout slices
 slice layout, archive is not sliced <=> first_size or other_size fields are set to zero (in practice both are set to zero, but one being set is enought to determine the archive is not sliced)
 

Additional Inherited Members

- Protected Member Functions inherited from libdar::mem_ui
user_interactionget_ui () const
 get access to the user_interaction object More...
 
std::shared_ptr< user_interactionget_pointer () const
 get access to the shared_ptr pointing to the user_interaction
 

Detailed Description

the archive::i_archive class implements the most general operations on archives

Definition at line 58 of file i_archive.hpp.


The documentation for this class was generated from the following file: