 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef CAT_DIRECTORY_HPP
27 #define CAT_DIRECTORY_HPP
29 #include "../my_config.h"
37 #ifdef LIBDAR_FAST_DIR
60 const std::string & xname,
62 cat_directory(
const std::shared_ptr<user_interaction> & dialog,
67 std::map <infinint, cat_etoile *> & corres,
82 bool has_children()
const {
return !ordered_fils.empty(); };
83 void reset_read_children()
const;
84 void end_read()
const;
85 bool read_children(
const cat_nomme * &r)
const;
87 void tail_to_read_children();
96 void remove(
const std::string & name);
99 bool search_children(
const std::string &name,
const cat_nomme *&ref)
const;
103 virtual unsigned char signature()
const override {
return 'd'; };
129 void get_etiquettes_found_in_tree(std::map<infinint, infinint> & already_found)
const;
132 bool is_empty()
const {
return ordered_fils.empty(); };
145 const infinint & get_size()
const { recursive_update_sizes();
return x_size; };
146 const infinint & get_storage_size()
const { recursive_update_sizes();
return x_storage_size; };
148 void recursively_set_to_unsaved_data_and_FSA();
151 virtual void change_location(
const smart_pointer<pile_descriptor> & pdesc)
override;
154 virtual void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const override;
157 static const cat_eod fin;
159 mutable infinint x_size;
160 mutable infinint x_storage_size;
161 mutable bool updated_sizes;
162 cat_directory *parent;
163 #ifdef LIBDAR_FAST_DIR
164 std::map<std::string, cat_nomme *> fils;
166 std::deque<cat_nomme *> ordered_fils;
167 mutable std::deque<cat_nomme *>::const_iterator
it;
168 mutable bool recursive_has_changed;
170 void init() noexcept;
172 void recursive_update_sizes() const;
173 void recursive_flag_size_to_update() const;
174 void erase_ordered_fils(std::deque<
cat_nomme *>::const_iterator debut,
175 std::deque<
cat_nomme *>::const_iterator fin);
void recursive_has_changed_update() const
ask recursive update for the recursive_has_changed field
virtual std::string get_description() const override
inherited class designation
virtual void change_location(const smart_pointer< pile_descriptor > &pdesc) override
overwrite virtual method of cat_entree to propagate the action to all entries of the directory tree
compression
the different compression algorithm available
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
true if object has been created by sequential reading of an archive
void remove_all_mirages_and_reduce_dirs()
recursively remove all mirage entries
infinint get_tree_size() const
get then number of "cat_nomme" entry contained in this cat_directory and subdirectories (recursive ca...
saved_status
data saved status for an entry
the arbitrary large positive integer class
virtual unsigned char signature() const override
inherited class signature
the base class for all entry that have a name
base object for all inode types, managed EA and FSA, dates, permissions, ownership,...
infinint get_dir_size() const
get the number of "cat_nomme" entry directly containted in this cat_directory (no recursive call)
the root class from all other inherite for any entry in the catalogue
holds the statistics contents of a catalogue
the root class for all cat_inode
class archive_version manages the version of the archive format
virtual cat_entree * clone() const override
a way to copy the exact type of an object even if pointed to by a parent class pointer
inode is saved in the archive
virtual bool operator==(const cat_entree &ref) const override
attention this compares only the directories themselves, not the list of their children
infinint get_tree_ea_num() const
get the number of entry having some EA set in the cat_directory tree (recursive call)
infinint get_tree_mirage_num() const
get the number of entry that are hard linked inode (aka mirage in dar implementation) (recursive call...
the cat_directory inode class
void set_all_mirage_s_inode_dumped_field_to(bool val) const
set the value of inode_dumped for all mirage (recusively)
void set_all_mirage_s_inode_wrote_field_to(bool val) const
recursively set all mirage inode_wrote flag
bool is_empty() const
whether this cat_directory is empty or not
void remove(const std::string &name)
remove the given entry from the catalogue
std::deque< cat_nomme * >::const_iterator it
next entry to be returned by read_children
bool get_recursive_has_changed() const
detemine whether some data has changed since archive of reference in this cat_directory or subdirecto...
libdar namespace encapsulate all libdar symbols