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();
154 virtual void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const override;
161 mutable bool updated_sizes;
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);
base object for all inode types, managed EA and FSA, dates, permissions, ownership,...
class archive_version manages the version of the archive format
the cat_directory inode class
void set_all_mirage_s_inode_wrote_field_to(bool val) const
recursively set all mirage inode_wrote flag
infinint get_tree_ea_num() const
get the number of entry having some EA set in the cat_directory tree (recursive call)
void recursive_has_changed_update() const
ask recursive update for the recursive_has_changed field
void set_all_mirage_s_inode_dumped_field_to(bool val) const
set the value of inode_dumped for all mirage (recusively)
void remove_all_mirages_and_reduce_dirs()
recursively remove all mirage entries
infinint get_dir_size() const
get the number of "cat_nomme" entry directly containted in this cat_directory (no recursive call)
virtual std::string get_description() const override
inherited class designation
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
true if object has been created by sequential reading of an archive
virtual unsigned char signature() const override
inherited class signature
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
infinint get_tree_mirage_num() const
get the number of entry that are hard linked inode (aka mirage in dar implementation) (recursive call...
void remove(const std::string &name)
remove the given entry from the catalogue
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
bool get_recursive_has_changed() const
detemine whether some data has changed since archive of reference in this cat_directory or subdirecto...
infinint get_tree_size() const
get then number of "cat_nomme" entry contained in this cat_directory and subdirectories (recursive ca...
std::deque< cat_nomme * >::const_iterator it
next entry to be returned by read_children
bool is_empty() const
whether this cat_directory is empty or not
virtual bool operator==(const cat_entree &ref) const override
attention this compares only the directories themselves, not the list of their children
the root class from all other inherite for any entry in the catalogue
the End of Directory entry class
the root class for all cat_inode
the base class for all entry that have a name
the arbitrary large positive integer class
compression
the different compression algorithm available
saved_status
data saved status for an entry
@ saved
inode is saved in the archive
libdar namespace encapsulate all libdar symbols
holds the statistics contents of a catalogue