26 #ifndef CAT_DIRECTORY_HPP
27 #define CAT_DIRECTORY_HPP
29 #include "../my_config.h"
35 #ifdef LIBDAR_FAST_DIR
56 const datetime & last_access,
57 const datetime & last_modif,
58 const datetime & last_change,
59 const std::string & xname,
64 const pile_descriptor & pdesc,
68 std::map <infinint, cat_etoile *> & corres,
79 bool has_children()
const {
return !ordered_fils.empty(); };
80 void reset_read_children()
const;
81 void end_read()
const;
82 bool read_children(
const cat_nomme * &r)
const;
84 void tail_to_read_children();
93 void remove(
const std::string & name);
96 bool search_children(
const std::string &name,
const cat_nomme *&ref)
const;
97 bool callback_for_children_of(
user_interaction & dialog,
const std::string & sdir,
bool isolated =
false)
const;
101 unsigned char signature()
const {
return mk_signature(
'd', get_saved_status()); };
121 void get_etiquettes_found_in_tree(std::map<infinint, infinint> & already_found)
const;
124 bool is_empty()
const {
return ordered_fils.empty(); };
134 const infinint & get_size()
const { recursive_update_sizes();
return x_size; };
135 const infinint & get_storage_size()
const { recursive_update_sizes();
return x_storage_size; };
137 void recursively_set_to_unsaved_data_and_FSA();
143 void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const;
146 static const cat_eod fin;
149 infinint x_storage_size;
151 cat_directory *parent;
152 #ifdef LIBDAR_FAST_DIR
153 std::map<std::string, cat_nomme *> fils;
155 std::list<cat_nomme *> ordered_fils;
156 std::list<cat_nomme *>::iterator it;
157 bool recursive_has_changed;
160 void recursive_update_sizes()
const;
161 void recursive_flag_size_to_update()
const;
holds the statistics contents of a catalogue
void change_location(const pile_descriptor &pdesc)
overwrite virtual method of cat_entree to propagate the action to all entries of the directory tree ...
This is a pure virtual class that is used by libdar when interaction with the user is required...
infinint get_tree_mirage_num() const
get the number of entry that are hard linked inode (aka mirage in dar implementation) (recursive call...
void recursive_has_changed_update() const
ask recursive update for the recursive_has_changed field
infinint get_tree_ea_num() const
get the number of entry having some EA set in the cat_directory tree (recursive call) ...
bool operator==(const cat_entree &ref) const
attention this compares only the directories themselves, not the list of their children ...
the cat_directory inode class
bool is_empty() const
whether this cat_directory is empty or not
memory_pool * get_pool() const
infinint get_tree_size() const
get then number of "cat_nomme" entry contained in this cat_directory and subdirectories (recursive ca...
the base class for all entry that have a name
void remove_all_mirages_and_reduce_dirs()
recursively remove all mirage entries
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
compression
the different compression algorithm available
unsigned char signature() const
inherited class signature
bool get_recursive_has_changed() const
detemine whether some data has changed since archive of reference in this cat_directory or subdirecto...
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
void inherited_dump(const pile_descriptor &pdesc, bool small) const
inherited class may overload this method but shall first call the parent's inherited_dump() in the ov...
void set_all_mirage_s_inode_dumped_field_to(bool val)
set the value of inode_dumped for all mirage (recusively)
class archive_version manages the version of the archive format
the root class from all other inherite for any entry in the catalogue
libdar namespace encapsulate all libdar symbols
cat_entree * clone() const
a way to copy the exact type of an object even if pointed to by a parent class pointer ...