 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
29 #include "../my_config.h"
63 catalogue(
const std::shared_ptr<user_interaction> & ui,
65 const label & data_name);
66 catalogue(
const std::shared_ptr<user_interaction> & ui,
67 const pile_descriptor & pdesc,
71 const label & lax_layer1_data_name,
72 bool only_detruit =
false);
82 virtual void reset_read()
const;
83 virtual void end_read()
const;
84 virtual void skip_read_to_parent_dir()
const;
87 virtual bool read(
const cat_entree * & ref)
const;
89 virtual bool read_if_present(std::string *name,
const cat_nomme * & ref)
const;
94 void remove_read_entry(std::string & name);
99 virtual void tail_catalogue_to_current_read();
102 void reset_sub_read(
const path &sub);
112 virtual bool read_second_time_dir()
const {
return false; };
122 virtual void pre_add_ea(
const cat_entree *ref,
const pile_descriptor* dest =
nullptr)
const {};
123 virtual void pre_add_crc(
const cat_entree *ref,
const pile_descriptor* dest =
nullptr)
const {};
124 virtual void pre_add_dirty(
const pile_descriptor* dest =
nullptr)
const {};
125 virtual void pre_add_ea_crc(
const cat_entree *ref,
const pile_descriptor* dest =
nullptr)
const {};
126 virtual void pre_add_waste_mark(
const pile_descriptor* dest =
nullptr)
const {};
127 virtual void pre_add_failed_mark(
const pile_descriptor* dest =
nullptr)
const {};
128 virtual void pre_add_fsa(
const cat_entree *ref,
const pile_descriptor* dest =
nullptr)
const {};
129 virtual void pre_add_fsa_crc(
const cat_entree *ref,
const pile_descriptor* dest =
nullptr)
const {};
130 virtual void pre_add_delta_sig(
const pile_descriptor* dest =
nullptr)
const {};
131 virtual escape *get_escape_layer()
const {
return nullptr; };
132 virtual void drop_escape_layer() {};
134 void add(cat_entree *ref);
135 void re_add_in(
const std::string &subdirname);
136 void re_add_in_replace(
const cat_directory &dir);
137 void add_in_current_read(cat_nomme *ref);
138 const cat_directory & get_current_add_dir()
const {
if(
current_add ==
nullptr)
throw SRC_BUG;
return *
current_add; };
144 void reset_compare()
const;
145 bool compare(
const cat_entree * name,
const cat_entree * & extracted)
const;
190 void dump(
const pile_descriptor & pdesc)
const;
192 entree_stats get_stats()
const {
return stats; };
199 const label & get_data_name()
const {
return ref_data_name; };
200 void set_data_name(
const label & val) {
ref_data_name = val; };
202 datetime get_root_dir_last_modif()
const {
return contenu->get_last_modif(); };
215 void set_to_unsaved_data_and_FSA() {
if(
contenu ==
nullptr)
throw SRC_BUG;
contenu->recursively_set_to_unsaved_data_and_FSA(); };
230 bool sequential_read,
232 const mask & delta_mask,
233 const infinint & delta_sig_min_size,
234 const delta_sig_block_size & signature_block_size);
240 entree_stats & access_stats() {
return stats; };
241 void copy_detruits_from(
const catalogue & ref);
243 const cat_eod * get_r_eod_address()
const {
return &
r_eod; };
263 void partial_copy_from(
const catalogue &ref);
267 static const U_I CAT_CRC_SIZE;
void recursive_has_changed_update() const
ask recursive update for the recursive_has_changed field
void drop_all_non_detruits()
remove/destroy from "this" all objects that are neither directory nor detruit objects
void swap_stuff(catalogue &ref)
base class of all objects contained in a catalogue and that can be named
void change_location(const pile_descriptor &pdesc)
change location where to find EA, FSA and DATA for all the objects of the catalogue
here lies a collection of mask classes
compression
the different compression algorithm available
static const cat_eod r_eod
needed to return eod reference, without taking risk of saturating memory
infinint update_destroyed_with(const catalogue &ref)
add into "this" detruit object corresponding to object of ref absent in "this"
bool is_subset_of(const catalogue &ref) const
check whether all inode existing in the "this" and ref have the same attributes
This is a pure virtual class that is used by libdar when interaction with the user is required.
manage label data structure used in archive slice headers
defines the interaction interface between libdar and users.
are defined here basic integer types that tend to be portable
switch module to limitint (32 ou 64 bits integers) or infinint
void reset_dump() const
before dumping the catalogue, need to set all hardlinked inode they have not been saved once
path out_compare
stores the missing directory structure, when extracting
the base class for all entry that have a name
this file contains the definition of class datetime that stores unix times in a portable way
entree_stats stats
statistics catalogue contents
cat_directory * current_compare
points to the current directory when extracting
cat_directory * contenu
catalogue contents
virtual void pre_add(const cat_entree *ref, const pile_descriptor *dest=nullptr) const
catalogue extension routines for escape sequence
the root class from all other inherite for any entry in the catalogue
holds the statistics contents of a catalogue
class archive_version manages the version of the archive format
void set_all_mirage_s_inode_wrote_field_to(bool val) const
recursive setting of mirage inode_wrote flag
define the datastructure "label" used to identify slice membership to an archive
class mem_ui to keep a copy of a user_interaction object
void transfer_delta_signatures(const pile_descriptor &destination, bool sequential_read, bool build, const mask &delta_mask, const infinint &delta_sig_min_size, const delta_sig_block_size &signature_block_size)
copy delta signatures to the given stack and update the cat_file objects accordingly
void launch_recursive_has_changed_update() const
recursive evaluation of directories that have changed (make the cat_directory::get_recurisve_has_chan...
the End of Directory entry class
structure used to define how to select block size for delta signature
cat_directory * current_add
points to the directory where to add the next file with add_file;
void dump(const pile_descriptor &pdesc) const
write down the whole catalogue to file
object describing the slicing of an archive
label ref_data_name
name of the archive where is located the data
the class path is here to manipulate paths in the Unix notation: using'/'
mem_ui(const std::shared_ptr< user_interaction > &dialog)
constructor
base class for all object contained in a catalogue
class used to organize objects in tree in catalogue as like directories in a filesystem
bool is_empty() const
whether the catalogue is empty or not
the cat_directory inode class
class escape definition, used for sequential reading of archives
the catalogue class which gather all objects contained in a give archive
void drop_delta_signatures()
remove delta signature from the catalogue object as if they had never been calculated
void reset_all()
reset all pointers to the root (a bit better than reset_add() + reset_read() + reset_compare() + rese...
void update_absent_with(const catalogue &ref, infinint aborting_next_etoile)
copy from ref missing files in "this" and mark then as "not_saved" (no change since reference)
bool is_empty() const
whether this cat_directory is empty or not
cat_directory * current_read
points to the directory where the next item will be read
signed int sub_count
count the depth in of read routine in the sub_tree
here is the definition of the path class
path * sub_tree
path to sub_tree
class mem_ui definition. This class is to be used as parent class to handle user_interaction object m...
libdar namespace encapsulate all libdar symbols