| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
libdar::filesystem_restore Class Reference
Private

receive the flow of inode from the restoration filtering routing and promotes these to real filesystem objects More...

`#include <filesystem_restore.hpp>`

Inherits libdar::filesystem_hard_link_write, and libdar::filesystem_hard_link_read.

## Public Types
using | action_done_for_data

## Public Member Functions
| 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
| filesystem_restore (const filesystem_restore &ref)=delete
| copy constructor is forbidden
| filesystem_restore (filesystem_restore &&ref)=delete
| move constructor is forbidden
filesystem_restore & | operator= (const filesystem_restore &ref)=delete
| assignment operator is forbidden
filesystem_restore & | operator= (filesystem_restore &&ref)=delete
| move operator is forbidden
| ~filesystem_restore ()
| destructor
void | reset_write ()
| reset the writing process for the current object
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
void | ignore_overwrite_restrictions_for_next_write ()
| ask for no warning or user interaction for the next write operation
Public Member Functions inherited from libdar::filesystem_hard_link_write
| filesystem_hard_link_write (const std::shared_ptr< user_interaction > &dialog)
| filesystem_hard_link_write (const filesystem_hard_link_write &ref)=delete
| filesystem_hard_link_write (filesystem_hard_link_write &&ref)=delete
filesystem_hard_link_write & | operator= (const filesystem_hard_link_write &ref)=delete
filesystem_hard_link_write & | operator= (filesystem_hard_link_write &&ref)=delete
void | write_hard_linked_target_if_not_set (const cat_mirage *ref, const std::string &chemin)
bool | known_etiquette (const infinint &eti)
void | clear_corres_if_pointing_to (const infinint &ligne, const std::string &path)
| forget everything about a hard link if the path used to build subsequent hard links is the one given in argument
Public Member Functions inherited from libdar::filesystem_hard_link_read
| filesystem_hard_link_read (const std::shared_ptr< user_interaction > &dialog, bool x_furtive_read_mode, const fsa_scope &scope)
| filesystem_hard_link_read (const filesystem_hard_link_read &ref)=delete
| filesystem_hard_link_read (filesystem_hard_link_read &&ref)=delete
filesystem_hard_link_read & | operator= (const filesystem_hard_link_read &ref)=delete
filesystem_hard_link_read & | operator= (filesystem_hard_link_read &&ref)=delete
const infinint & | get_last_etoile_ref () const
| get the last assigned number for a hard linked inode
const fsa_scope | get_fsa_scope () const
| provide the FSA scope used by the object
void | zeroing_negative_dates_without_asking ()
| don't ask before zeroing negative date just warn user
void | set_ignored_symlinks_list (const std::set< std::string > &x_ignored_symlinks)

## Private Member Functions
void | detruire ()
void | restore_stack_dir_ownership ()
user_interaction & | get_ui () const
std::shared_ptr< user_interaction > | get_pointer () const
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
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_detruit
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
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

## Private Attributes
path * | fs_root
bool | info_details
mask * | ea_mask
bool | warn_overwrite
comparison_fields | what_to_check
bool | warn_remove_no_match
std::deque< stack_dir_t > | stack_dir
path * | current_dir
bool | empty
bool | ignore_over_restricts
const crit_action * | overwrite
bool | only_overwrite

## Additional Inherited Members
Protected Member Functions inherited from libdar::filesystem_hard_link_write
void | corres_reset ()
void | make_file (const cat_nomme *ref, const path &ou)
| generate inode or make a hard link on an already restored or existing inode.
bool | raw_set_ea (const cat_nomme *e, const ea_attributs &list_ea, const std::string &spot, const mask &ea_mask)
| add the given EA matching the given mask to the file pointed to by "e" and spot
bool | raw_clear_ea_set (const cat_nomme *e, const std::string &path)
| remove EA set from filesystem's file, allows subsequent raw_set_ea
Protected Member Functions inherited from libdar::mem_ui
user_interaction & | get_ui () const
| get access to the user_interaction object
std::shared_ptr< user_interaction > | get_pointer () const
| get access to the shared_ptr pointing to the user_interaction
void | change_ui (const std::shared_ptr< user_interaction > &new_dialog)
| change the user_interaction object
| mem_ui (const std::shared_ptr< user_interaction > &dialog)
| constructor
| mem_ui (const mem_ui &ref)=default
| the copy constructor
| mem_ui (mem_ui &&ref) noexcept=default
| the move constructor
mem_ui & | operator= (const mem_ui &ref)=default
| assignement operator
mem_ui & | operator= (mem_ui &&ref) noexcept=default
| move operator
virtual | ~mem_ui () noexcept(false)
| destructor
Protected Member Functions inherited from libdar::filesystem_hard_link_read
void | corres_reset ()
| reset the whole list of hard linked inodes (hard linked inode stay alive but are no more referenced by the current object)
cat_nomme * | make_read_entree (const path &lieu, const std::string &name, bool see_hard_link, const mask &ea_mask)
bool | get_ask_before_zeroing_neg_dates () const

## Detailed Description

receive the flow of inode from the restoration filtering routing and promotes these to real filesystem objects

Definition at line 58 of file filesystem_restore.hpp.

## Member Typedef Documentation

## ◆ action_done_for_data

using libdar::filesystem_restore::action_done_for_data

Initial value:
enum
{
done_data_restored,
done_no_change_no_data,
done_no_change_policy,
done_data_removed
}

Definition at line 92 of file filesystem_restore.hpp.

## Constructor & Destructor Documentation

## ◆ ~filesystem_restore()

libdar::filesystem_restore::~filesystem_restore | ( |  | ) |
| inline

destructor

Definition at line 87 of file filesystem_restore.hpp.

## Member Function Documentation

## ◆ get_pointer()

std::shared_ptr< user_interaction > libdar::filesystem_restore::get_pointer | ( |  | ) | const
| inlineprivate

Definition at line 155 of file filesystem_restore.hpp.

## ◆ get_ui()

user_interaction & libdar::filesystem_restore::get_ui | ( |  | ) | const
| inlineprivate

Definition at line 154 of file filesystem_restore.hpp.

## ◆ ignore_overwrite_restrictions_for_next_write()

void libdar::filesystem_restore::ignore_overwrite_restrictions_for_next_write | ( |  | ) |
| inline

ask for no warning or user interaction for the next write operation

Note
  this is used when a file has been saved several times due to its changes at the time of the backup and is restored in sequential read. Restoring each failed backup would lead to ask each time the actions to take about overwriting... anoying for the user

Definition at line 123 of file filesystem_restore.hpp.

## ◆ write()

void libdar::filesystem_restore::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

Parameters

  [in] | x | is the libdar object to restore
  [out] | data_restored | true if data has been restored (inode or hard link created), false if either there is no data to restore or if this action is forbidden by the overwriting policy
  [out] | ea_restored | true if EA has been restored, false if either no EA to restore or if forbidden by overwriting policy
  [out] | data_created | true if data has been restored leading to file creation, false in any other case
  [out] | hard_link | true when data_restored is true and only a hard link to an already existing inode has been created
  [out] | fsa_restored | true if FSA has been restored, false if either no FSA to restore or if forbidden by overwriting policy

Note
  any failure to restore data or EA that is not due to its absence in "x" nor to an interdiction from the overwriting policy is signaled through an exception.

## Member Data Documentation

## ◆ current_dir

path* libdar::filesystem_restore::current_dir
| private

Definition at line 146 of file filesystem_restore.hpp.

## ◆ ea_mask

mask* libdar::filesystem_restore::ea_mask
| private

Definition at line 141 of file filesystem_restore.hpp.

## ◆ empty

bool libdar::filesystem_restore::empty
| private

Definition at line 147 of file filesystem_restore.hpp.

## ◆ fs_root

path* libdar::filesystem_restore::fs_root
| private

Definition at line 139 of file filesystem_restore.hpp.

## ◆ ignore_over_restricts

bool libdar::filesystem_restore::ignore_over_restricts
| private

Definition at line 148 of file filesystem_restore.hpp.

## ◆ info_details

bool libdar::filesystem_restore::info_details
| private

Definition at line 140 of file filesystem_restore.hpp.

## ◆ only_overwrite

bool libdar::filesystem_restore::only_overwrite
| private

Definition at line 150 of file filesystem_restore.hpp.

## ◆ overwrite

const crit_action* libdar::filesystem_restore::overwrite
| private

Definition at line 149 of file filesystem_restore.hpp.

## ◆ stack_dir

std::deque<stack_dir_t> libdar::filesystem_restore::stack_dir
| private

Definition at line 145 of file filesystem_restore.hpp.

## ◆ warn_overwrite

bool libdar::filesystem_restore::warn_overwrite
| private

Definition at line 142 of file filesystem_restore.hpp.

## ◆ warn_remove_no_match

bool libdar::filesystem_restore::warn_remove_no_match
| private

Definition at line 144 of file filesystem_restore.hpp.

## ◆ what_to_check

comparison_fields libdar::filesystem_restore::what_to_check
| private

Definition at line 143 of file filesystem_restore.hpp.

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

- filesystem_restore.hpp