Disk ARchive  2.7.14
Full featured and portable backup and archiving tool
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
libdar::database::i_database Class Reference

the class i_database is the implementation of class database More...

#include <i_database.hpp>

+ Inheritance diagram for libdar::database::i_database:
+ Collaboration diagram for libdar::database::i_database:

Classes

struct  archive_data
 holds the archive used to create the database More...
 

Public Member Functions

 i_database (const std::shared_ptr< user_interaction > &dialog)
 this constructor build an empty database
 
 i_database (const std::shared_ptr< user_interaction > &dialog, const std::string &base, const database_open_options &opt)
 this constructor reads i_database from a file
 
 i_database (const i_database &ref)=delete
 disabling copy constructor
 
 i_database (i_database &&ref) noexcept=delete
 disabling move constructor
 
i_databaseoperator= (const i_database &ref)=delete
 disabling assignement operator
 
i_databaseoperator= (i_database &&ref) noexcept=delete
 disabling move assignment operator
 
 ~i_database ()
 i_database destructor (no implicit file saving)
 
void dump (const std::string &filename, const database_dump_options &opt) const
 write the database to a file (see database_header first)
 
void add_archive (const archive &arch, const std::string &chemin, const std::string &basename, const database_add_options &opt)
 add an archive to the database
 
void remove_archive (archive_num min, archive_num max, const database_remove_options &opt)
 remove an archive from a database
 
void set_permutation (archive_num src, archive_num dst)
 change order of archive within the database
 
void change_name (archive_num num, const std::string &basename, const database_change_basename_options &opt)
 change one's archive basename recorded in the database
 
void set_path (archive_num num, const std::string &chemin, const database_change_path_options &opt)
 change one's archive path recorded in the database
 
void set_options (const std::vector< std::string > &opt)
 change the default options given to dar when performing restoration
 
void set_dar_path (const std::string &chemin)
 change the path to dar command
 
void set_compression (compression algozip) const
 change compression to use when storing base on file
 
void set_compression_level (U_I level) const
 change the compression level to use when storing base in file
 
database_archives_list get_contents () const
 provides the list of archive used to build the database
 
std::vector< std::string > get_options () const
 return the options used with dar for restoration
 
std::string get_dar_path () const
 returns the path for dar
 
compression get_compression () const
 returns the compression algorithm used on filesystem
 
U_I get_compression_level () const
 returns the compression level used on file
 
std::string get_database_version () const
 return the database format version
 
void get_files (database_listing_show_files_callback callback, void *context, archive_num num, const database_used_options &opt) const
 list files which are present in a given archive
 
void get_version (database_listing_get_version_callback callback, void *context, path chemin) const
 list the archive where a give file is present
 
void show_most_recent_stats (database_listing_statistics_callback callback, void *context) const
 compute some statistics about the location of most recent file versions
 
void restore (const std::vector< std::string > &filename, const database_restore_options &opt)
 restore files calling dar on the appropriated archive
 
bool check_order () const
 check that all files's Data and EA are more recent when archive number grows within the database, only warn the user
 
- Public Member Functions inherited from libdar::mem_ui
 mem_ui (const std::shared_ptr< user_interaction > &dialog)
 constructor More...
 
 mem_ui (const mem_ui &ref)=default
 the copy constructor More...
 
 mem_ui (mem_ui &&ref) noexcept=default
 the move constructor
 
mem_uioperator= (const mem_ui &ref)=default
 assignement operator More...
 
mem_uioperator= (mem_ui &&ref) noexcept=default
 move operator
 
virtual ~mem_ui () noexcept(false)
 destructor More...
 

Private Member Functions

void build (generic_file &f, bool partial, bool read_only, unsigned char db_version)
 used by constructors
 
archive_num get_real_archive_num (archive_num num, bool revert) const
 
const datetimeget_root_last_mod (const archive_num &num) const
 

Private Attributes

std::deque< struct archive_datacoordinate
 list of archive used to build the database
 
std::vector< std::string > options_to_dar
 options to use when calling dar for restoration
 
std::string dar_path
 path to dar
 
data_dirfiles
 structure containing files and their status in the set of archive used for that database (is set to nullptr in partial mode)
 
storagedata_files
 when reading archive in partial mode, this is where is located the "not readed" part of the archive (is set to nullptr in partial-read-only mode)
 
bool check_order_asked
 whether order check has been asked
 
unsigned char cur_db_version
 current db version (for informational purposes)
 
compression algo
 compression used/to use when writing down the base to file
 
U_I compr_level
 the compression level to use
 

Additional Inherited Members

- Protected Member Functions inherited from libdar::mem_ui
user_interactionget_ui () const
 get access to the user_interaction object More...
 
std::shared_ptr< user_interactionget_pointer () const
 get access to the shared_ptr pointing to the user_interaction
 

Detailed Description

the class i_database is the implementation of class database

Definition at line 52 of file i_database.hpp.


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