26#ifndef CAT_DIRECTORY_HPP
27#define CAT_DIRECTORY_HPP
29#include "../my_config.h"
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;
119 bool search_children(
const std::string &name,
const cat_nomme *&ref)
const;
123 virtual unsigned char signature()
const override {
return 'd'; };
149 void get_etiquettes_found_in_tree(std::map<infinint, infinint> & already_found)
const;
152 bool is_empty()
const {
return ordered_fils.empty(); };
168 const infinint & get_size()
const { recursive_update_sizes();
return x_size; };
169 const infinint & get_storage_size()
const { recursive_update_sizes();
return x_storage_size; };
171 void recursively_set_to_unsaved_data_and_FSA();
177 virtual void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const override;
184 mutable bool updated_sizes;
186#ifdef LIBDAR_FAST_DIR
187 std::map<std::string, cat_nomme *> fils;
189 std::deque<cat_nomme *> ordered_fils;
190 mutable std::deque<cat_nomme *>::const_iterator
it;
191 mutable bool recursive_has_changed;
193 void init() noexcept;
194 void recursive_update_sizes() const;
195 void recursive_flag_size_to_update() const;
196 void erase_ordered_fils(std::deque<
cat_nomme *>::const_iterator debut,
197 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)
bool tail_to_read_children(bool including_last_read)
remove all entry not yet read by read_children
std::deque< cat_nomme * >::const_iterator it
next entry to be returned by read_children
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)
bool remove_last_read()
remove last read entry of self from parent directory
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
infinint get_tree_mirage_num() const
get the number of entry that are hard linked inode (aka mirage in dar implementation) (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
bool remove_all_except_mirages()
remove all entry of the current directory except cat_mirage or cat_directory containing cat_mirage
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
void remove_all_ea_and_fsa()
remove all EA and FSA recursively (those "full" get flagged "partial")
void clear()
remove all entries contained in this directory (recursively)
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...
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
void remove_if_no_mirage(const std::string &name)
remove the given entry if it is not a cat_mirage or a directory tree with cat_mirage objects
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