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

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

#include <filesystem.hpp>

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

Public Types

enum  action_done_for_data { done_data_restored, done_no_change_no_data, done_no_change_policy, done_data_removed }
 

Public Member Functions

 filesystem_restore (user_interaction &dialog, const path &root, bool x_warn_overwrite, bool x_info_details, const mask &x_ea_mask, cat_inode::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)
 copy constructor is forbidden (throws an exception)
 
const filesystem_restoreoperator= (const filesystem_restore &ref)
 assignment operator is forbidden (throws an exception)
 
 ~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 More...
 
void ignore_overwrite_restrictions_for_next_write ()
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from libdar::mem_ui
user_interactionget_ui () const
 get access to the user_interaction cloned object More...
 
 mem_ui (const user_interaction &dialog)
 constructor More...
 
 mem_ui (user_interaction *dialog)
 
 mem_ui (const mem_ui &ref)
 the copy constructor More...
 
virtual ~mem_ui () throw (Ebug)
 destructor More...
 
const mem_uioperator= (const mem_ui &ref)
 assignement operator More...
 
- 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)
 
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
 

Detailed Description

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

Definition at line 294 of file filesystem.hpp.

Member Function Documentation

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 349 of file filesystem.hpp.

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]xis the libdar object to restore
[out]data_restoredtrue 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_restoredtrue if EA has been restored, false if either no EA to restore or if forbidden by overwriting policy
[out]data_createdtrue if data has been restored leading to file creation, false in any other case
[out]hard_linktrue when data_restored is true and only a hard link to an already existing inode has been created
[out]fsa_restoredtrue 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.

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