Disk ARchive  2.5.13
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
Public Member Functions | Protected Member Functions | List of all members
libdar::cat_directory Class Reference

the cat_directory inode class More...

#include <cat_directory.hpp>

Inherits libdar::cat_inode.

Public Member Functions

 cat_directory (const infinint &xuid, const infinint &xgid, U_16 xperm, const datetime &last_access, const datetime &last_modif, const datetime &last_change, const std::string &xname, const infinint &device)
 
 cat_directory (const cat_directory &ref)
 
const cat_directoryoperator= (const cat_directory &ref)
 
 cat_directory (user_interaction &dialog, const smart_pointer< pile_descriptor > &pdesc, const archive_version &reading_ver, saved_status saved, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, bool lax, bool only_detruit, bool small)
 
bool operator== (const cat_entree &ref) const
 attention this compares only the directories themselves, not the list of their children
 
void add_children (cat_nomme *r)
 
bool has_children () const
 
void reset_read_children () const
 
void end_read () const
 
bool read_children (const cat_nomme *&r) const
 
void tail_to_read_children ()
 
void remove (const std::string &name)
 
cat_directoryget_parent () const
 
bool search_children (const std::string &name, const cat_nomme *&ref) const
 
bool callback_for_children_of (user_interaction &dialog, const std::string &sdir, bool isolated=false) const
 
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 subdirectories
 
void recursive_has_changed_update () const
 ask recursive update for the recursive_has_changed field
 
infinint get_tree_size () const
 get then number of "cat_nomme" entry contained in this cat_directory and subdirectories (recursive call)
 
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)
 
void get_etiquettes_found_in_tree (std::map< infinint, infinint > &already_found) const
 
bool is_empty () const
 whether this cat_directory is empty or not
 
void remove_all_mirages_and_reduce_dirs ()
 recursively remove all mirage entries
 
void set_all_mirage_s_inode_wrote_field_to (bool val)
 recursively set all mirage inode_wrote flag
 
void set_all_mirage_s_inode_dumped_field_to (bool val)
 set the value of inode_dumped for all mirage (recusively)
 
cat_entreeclone () const
 a way to copy the exact type of an object even if pointed to by a parent class pointer
 
const infinintget_size () const
 
const infinintget_storage_size () const
 
void recursively_set_to_unsaved_data_and_FSA ()
 
void change_location (const smart_pointer< pile_descriptor > &pdesc)
 overwrite virtual method of cat_entree to propagate the action to all entries of the directory tree
 
- Public Member Functions inherited from libdar::cat_inode
 cat_inode (const infinint &xuid, const infinint &xgid, U_16 xperm, const datetime &last_access, const datetime &last_modif, const datetime &last_change, const std::string &xname, const infinint &device)
 
 cat_inode (user_interaction &dialog, const smart_pointer< pile_descriptor > &pdesc, const archive_version &reading_ver, saved_status saved, bool small)
 
 cat_inode (const cat_inode &ref)
 
const cat_inodeoperator= (const cat_inode &ref)
 
const infinintget_uid () const
 
const infinintget_gid () const
 
U_16 get_perm () const
 
datetime get_last_access () const
 
datetime get_last_modif () const
 
void set_last_access (const datetime &x_time)
 
void set_last_modif (const datetime &x_time)
 
saved_status get_saved_status () const
 
void set_saved_status (saved_status x)
 
infinint get_device () const
 
bool same_as (const cat_inode &ref) const
 
bool is_more_recent_than (const cat_inode &ref, const infinint &hourshift) const
 
virtual bool has_changed_since (const cat_inode &ref, const infinint &hourshift, comparison_fields what_to_check) const
 
void compare (const cat_inode &other, const mask &ea_mask, comparison_fields what_to_check, const infinint &hourshift, bool symlink_date, const fsa_scope &scope, bool isolated_mode) const
 
void ea_set_saved_status (ea_status status)
 
ea_status ea_get_saved_status () const
 
void ea_attach (ea_attributs *ref)
 
const ea_attributsget_ea () const
 
void ea_detach () const
 
infinint ea_get_size () const
 
void ea_set_offset (const infinint &pos)
 
bool ea_get_offset (infinint &pos) const
 
void ea_set_crc (const crc &val)
 
void ea_get_crc (const crc *&ptr) const
 
bool ea_get_crc_size (infinint &val) const
 
datetime get_last_change () const
 
void set_last_change (const datetime &x_time)
 
bool has_last_change () const
 
void fsa_set_saved_status (fsa_status status)
 
fsa_status fsa_get_saved_status () const
 
fsa_scope fsa_get_families () const
 gives the set of FSA family recorded for that inode
 
void fsa_attach (filesystem_specific_attribute_list *ref)
 
void fsa_partial_attach (const fsa_scope &val)
 
const
filesystem_specific_attribute_list * 
get_fsa () const
 
void fsa_detach () const
 
infinint fsa_get_size () const
 
void fsa_set_offset (const infinint &pos)
 
bool fsa_get_offset (infinint &pos) const
 
void fsa_set_crc (const crc &val)
 
void fsa_get_crc (const crc *&ptr) const
 
bool fsa_get_crc_size (infinint &val) const
 
- Public Member Functions inherited from libdar::cat_nomme
 cat_nomme (const std::string &name)
 
 cat_nomme (const smart_pointer< pile_descriptor > &pdesc, bool small)
 
bool operator== (const cat_entree &ref) const
 returns true if the two object have the same content
 
virtual bool operator< (const cat_nomme &ref) const
 
const std::string & get_name () const
 
void change_name (const std::string &x)
 
bool same_as (const cat_nomme &ref) const
 
- Public Member Functions inherited from libdar::cat_entree
 cat_entree (const smart_pointer< pile_descriptor > &pdesc, bool small)
 
 cat_entree ()
 setup an object when read from filesystem
 
virtual ~cat_entree () throw (Ebug)
 destructor
 
bool operator!= (const cat_entree &ref) const
 
void dump (const pile_descriptor &pdesc, bool small) const
 
void specific_dump (const pile_descriptor &pdesc, bool small) const
 
virtual void post_constructor (const pile_descriptor &pdesc)
 
- Public Member Functions inherited from libdar::on_pool
void * operator new (size_t n_byte)
 
void * operator new (size_t n_byte, const std::nothrow_t &nothrow_value)
 
void * operator new[] (size_t n_byte)
 
void * operator new[] (size_t n_byte, const std::nothrow_t &nothrow_value)
 
void * operator new (size_t n_byte, memory_pool *p)
 
void * operator new[] (size_t n_byte, memory_pool *p)
 
void operator delete (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated object
 
void operator delete[] (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated objects
 
void operator delete (void *ptr)
 this is the usual delete operator, modified to handle allocated objects allocated on a memory pool or not
 
void operator delete[] (void *ptr)
 this is the usual delete[] operator, modified to handle allocated objects allocated on a memory pool or not
 

Protected Member Functions

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 overloaded method
 
- Protected Member Functions inherited from libdar::cat_inode
virtual void sub_compare (const cat_inode &other, bool isolated_mode) const
 
bool get_small_read () const
 
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 overloaded method
 
- Protected Member Functions inherited from libdar::cat_nomme
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 overloaded method
 
- Protected Member Functions inherited from libdar::cat_entree
pile * get_pile () const
 stack used to read object from (nullptr is returned for object created from filesystem)
 
compressorget_compressor_layer () const
 
escape * get_escape_layer () const
 
generic_fileget_read_cat_layer (bool small) const
 return the adhoc layer in the stack to read from the catalogue objects (except the EA, FSA or Data part)
 
- Protected Member Functions inherited from libdar::on_pool
memory_pool * get_pool () const
 
template<class T >
void meta_new (T *&ptr, size_t num)
 
template<class T >
void meta_delete (T *ptr)
 

Additional Inherited Members

- Public Types inherited from libdar::cat_inode
enum  comparison_fields { cf_all, cf_ignore_owner, cf_mtime, cf_inode_type }
 flag used to only consider certain fields when comparing/restoring inodes
 
enum  ea_status {
  ea_none, ea_partial, ea_fake, ea_full,
  ea_removed
}
 
enum  fsa_status { fsa_none, fsa_partial, fsa_full }
 
- Static Public Member Functions inherited from libdar::cat_entree
static cat_entreeread (user_interaction &dialog, memory_pool *pool, const smart_pointer< pile_descriptor > &f, const archive_version &reading_ver, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, bool lax, bool only_detruit, bool small)
 

Detailed Description

the cat_directory inode class

Definition at line 51 of file cat_directory.hpp.

Member Function Documentation

void libdar::cat_directory::remove ( const std::string &  name)

remove the given entry from the catalogue

Note
read_children() is taken into account by this operation, no need to call reset_read_children(), if the argument removed was the one about to be read by read_children() the one following the removed entry will be returned the next time read_children() is invoked.

The documentation for this class was generated from the following file: