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,
infinint get_dir_size() const
get the number of "cat_nomme" entry directly containted in this cat_directory (no recursive call) ...
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 ...
saved_status
data saved status for an entry
virtual unsigned char signature() const override
inherited class signature
holds the statistics contents of a catalogue
the End of Directory entry class
infinint get_tree_ea_num() const
get the number of entry having some EA set in the cat_directory tree (recursive call) ...
void set_all_mirage_s_inode_wrote_field_to(bool val) const
recursively set all mirage inode_wrote flag
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_size() const
get then number of "cat_nomme" entry contained in this cat_directory and subdirectories (recursive ca...
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
std::deque< cat_nomme * >::const_iterator it
next entry to be returned by read_children
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)
inode is saved in the archive
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 ...
the base class for all entry that have a name
void remove_all_mirages_and_reduce_dirs()
recursively remove all mirage entries
compression
the different compression algorithm available
the root class for all cat_inode
base object for all inode types, managed EA and FSA, dates, permissions, ownership, ...
the arbitrary large positive integer class
class archive_version manages the version of the archive format
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_mirage_num() const
get the number of entry that are hard linked inode (aka mirage in dar implementation) (recursive call...
the root class from all other inherite for any entry in the catalogue
bool is_empty() const
whether this cat_directory is empty or not
libdar namespace encapsulate all libdar symbols
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
true if object has been created by sequential reading of an archive