26 #ifndef FILESYSTEM_RESTORE_HPP 27 #define FILESYSTEM_RESTORE_HPP 29 #include "../my_config.h" 64 bool x_warn_overwrite,
66 const mask & x_ea_mask,
68 bool x_warn_remove_no_match,
71 bool x_only_overwrite,
92 using action_done_for_data =
enum 95 done_no_change_no_data,
96 done_no_change_policy,
111 action_done_for_data & data_restored,
115 bool & fsa_restored);
132 bool get_restore_date()
const {
return restore_date; };
133 void set_restore_date(
bool val) { restore_date = val; };
144 bool warn_remove_no_match;
145 std::deque<stack_dir_t> stack_dir;
148 bool ignore_over_restricts;
153 void restore_stack_dir_ownership();
162 const std::string & spot,
167 const std::string & spot,
169 action_done_for_data & data_done);
173 const std::string & spot,
178 const std::string & spot,
comparison_fields
how to consider file change during comparison and incremental backup
filesystem_restore & operator=(const filesystem_restore &ref)=delete
assignment operator is forbidden
void write(const cat_entree *x, action_done_for_data &data_restored, bool &ea_restored, bool &data_created, bool &hard_link, bool &fsa_restored)
restore a libdar object to a filesystem entry both data and EA
filesystem specific attributes available families and fsa_scope definition
the generic class, parent of all masks
user_interaction & get_ui() const
get access to the user_interaction object
over_action_data
the possible actions for overwriting data
keep trace of hard links when reading the filesystem
void ignore_overwrite_restrictions_for_next_write()
ask for no warning or user interaction for the next write operation
This is a pure virtual class that is used by libdar when interaction with the user is required...
std::shared_ptr< user_interaction > get_pointer() const
get access to the shared_ptr pointing to the user_interaction
void action_over_remove(const cat_inode *in_place, const cat_detruit *to_be_added, const std::string &spot, over_action_data action)
perform action due to the overwriting policy when the "to be added" entry is a detruit object ...
filesystem_hard_link_read classes manages hardlinked inode read from filesystem
bool action_over_fsa(const cat_inode *in_place, const cat_nomme *to_be_added, const std::string &spot, over_action_ea action)
perform action for FSA due to overwriting policy
over_action_ea
the possible action for overwriting EA
the cat_directory inode class
bool action_over_ea(const cat_inode *in_place, const cat_nomme *to_be_added, const std::string &spot, over_action_ea action)
perform action for EA due to overwriting policy
the global action for overwriting
void action_over_data(const cat_inode *in_place, const cat_nomme *to_be_added, const std::string &spot, over_action_data action, action_done_for_data &data_done)
perform action for data due to the overwriting policy when the "to be added" entry is not a cat_detru...
the base class for all entry that have a name
std::set< fsa_family > fsa_scope
set of fsa families
void reset_write()
reset the writing process for the current object
class filesystem_hard_link_write keeps trace of already written inode to restore hard links ...
~filesystem_restore()
destructor
the root class for all cat_inode
receive the flow of inode from the restoration filtering routing and promotes these to real filesyste...
include file gathering all entree found in a catalogue
the root class from all other inherite for any entry in the catalogue
contains classes that let the user define the policy for overwriting files
libdar namespace encapsulate all libdar symbols
keep trace of already written inodes to restore hard links
filesystem_restore(const std::shared_ptr< user_interaction > &dialog, const path &root, bool x_warn_overwrite, bool x_info_details, const mask &x_ea_mask, comparison_fields what_to_check, bool x_warn_remove_no_match, bool empty, const crit_action *x_overwrite, bool x_only_overwrite, const fsa_scope &scope)
constructor
the class path is here to manipulate paths in the Unix notation: using'/'