 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
27 #ifndef I_DATABASE_HPP
28 #define I_DATABASE_HPP
30 #include "../my_config.h"
56 i_database(
const std::shared_ptr<user_interaction> & dialog);
59 i_database(
const std::shared_ptr<user_interaction> & dialog,
60 const std::string & base,
138 void *context)
const;
143 void restore(
const std::vector<std::string> & filename,
149 bool initial_warn =
true;
the archive class is defined in this module
the data_dir class inherits from data_tree and holds the directory tree's parent relationship
compression algo
compression used/to use when writing down the base to file
void restore(const std::vector< std::string > &filename, const database_restore_options &opt)
restore files calling dar on the appropriated archive
user_interaction & get_ui() const
get access to the user_interaction object
void(*)(void *context, U_I number, const infinint &data_count, const infinint &total_data, const infinint &ea_count, const infinint &total_ea) database_listing_statistics_callback
called with teh information of statistics for each archive in turn
i_database(const std::shared_ptr< user_interaction > &dialog)
this constructor build an empty database
the class i_database is the implementation of class database
compression
the different compression algorithm available
void get_version(database_listing_get_version_callback callback, void *context, path chemin) const
list the archive where a give file is present
options for restoration from database
void build(generic_file &f, bool partial, bool read_only, unsigned char db_version)
used by constructors
this file holds the database class definition
options for changing a given archive's path
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
arbitrary large storage structure
void set_permutation(archive_num src, archive_num dst)
change order of archive within the database
bool check_order_asked
whether order check has been asked
std::vector< std::string > get_options() const
return the options used with dar for restoration
void set_options(const std::vector< std::string > &opt)
change the default options given to dar when performing restoration
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
data_dir * files
structure containing files and their status in the set of archive used for that database (is set to n...
this file holds the options for database operations
void set_compression(compression algozip)
change compression to use when storing base on file
bool check_order() const
check that all files's Data and EA are more recent when archive number grows within the database,...
void set_dar_path(const std::string &chemin)
change the path to dar command
options to open a database
std::string dar_path
path to dar
std::deque< database_archives > database_archives_list
list of archives found in a database
void remove_archive(archive_num min, archive_num max, const database_remove_options &opt)
remove an archive from a database
std::string basename
basename of the archive
std::string get_dar_path() const
returns the path for dar
class mem_ui to keep a copy of a user_interaction object
class generic_file is defined here as well as class fichier
holds the archive used to create the database
the class path is here to manipulate paths in the Unix notation: using'/'
std::string get_database_version() const
return the database format version
void(*)(void *context, archive_num num, db_etat data_presence, bool has_data_date, datetime data, db_etat ea_presence, bool has_ea_date, datetime ea) database_listing_get_version_callback
called with the information of presence for an entry in archive number num
this file stores the list of archives a database has been built from. it is part of the database head...
i_database & operator=(const i_database &ref)=delete
disabling assignement operator
classes used to store directory tree information in dar_manager databases
this is the interface class from which all other data transfer classes inherit
std::vector< std::string > options_to_dar
options to use when calling dar for restoration
storage * data_files
when reading archive in partial mode, this is where is located the "not readed" part of the archive (...
~i_database()
i_database destructor (no implicit file saving)
database_archives_list get_contents() const
provides the list of archive used to build the database
void dump(const std::string &filename, const database_dump_options &opt) const
write the database to a file (see database_header first)
void show_most_recent_stats(database_listing_statistics_callback callback, void *context) const
compute some statistics about the location of most recent file versions
the archive class realizes the most general operations on archives
options to write a database to file
class archive_num stores the position of an archive inside a dar_manager database
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
options to add an archive to base
unsigned char cur_db_version
current db version (for informational purposes)
options for file "used" in archive
virtual bool check_order(user_interaction &dialog, const path ¤t_path, bool &initial_warn) const override
check date order between archives withing the database ; throw Erange if problem found with date orde...
contains a class that permits arbitrary large data storage
EA present in filesystem but not stored (ctime used to check changes)
options to remove an archive from the base
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
compression get_compression() const
returns the compression algorithm used on filesystem
options for changing a given archive's basename
std::deque< struct archive_data > coordinate
list of archive used to build the database
datetime root_last_mod
last modification date of the root directory
void(*)(void *context, const std::string &filename, bool available_data, bool available_ea) database_listing_show_files_callback
called by the database::get_files() routine
std::string chemin
path to the archive
class mem_ui definition. This class is to be used as parent class to handle user_interaction object m...
libdar namespace encapsulate all libdar symbols