30 #include "../my_config.h"
120 void set_options(
const std::vector<std::string> &opt) { options_to_dar = opt; };
138 std::vector<std::string>
get_options()
const {
return options_to_dar; };
176 const std::vector<std::string> & filename,
186 bool initial_warn =
true;
190 if(check_order_asked)
191 return files->
check_order(dialog,
".", initial_warn) && initial_warn;
203 std::string basename;
204 datetime root_last_mod;
207 std::vector<struct archive_data> coordinate;
208 std::vector<std::string> options_to_dar;
209 std::string dar_path;
212 bool check_order_asked;
214 void build(user_interaction & dialog, generic_file & f,
bool partial,
bool read_only,
unsigned char db_version);
217 const datetime & get_root_last_mod(
const archive_num & num)
const;
database()
this constructor build an empty database
bool check_order(user_interaction &dialog) const
check that all files's Data and EA are more recent when archive number grows within the database...
options for file "used" in archive
options for changing a given archive's path
options to add an archive to base
the archive class is defined in this module
void restore(user_interaction &dialog, const std::vector< std::string > &filename, const database_restore_options &opt)
restore files calling dar on the appropriated archive
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 remove_archive(archive_num min, archive_num max, const database_remove_options &opt)
remove an archive from a database
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
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 show_most_recent_stats(user_interaction &dialog) const
compute some statistics about the location of most recent file versions
void show_contents(user_interaction &dialog) const
show the list of archive used to build the database
void dump(user_interaction &dialog, const std::string &filename, const database_dump_options &opt) const
write the database to a file (see database_header first)
two classes used to store tree information in dar_manager databases
bool check_order(user_interaction &dialog, const path ¤t_path, bool &initial_warn) const
check date order between archives withing the database ; throw Erange if problem found with date orde...
This is a pure virtual class that is used by libdar when interaction with the user is required...
contains a class that permits arbitrary large data storage
options for changing a given archive's basename
options to remove an archive from the base
options to open a database
options to write a database to file
std::vector< std::string > get_options() const
return the options used with dar for restoration
the archive class realizes the most general operations on archives
std::string get_dar_path() const
return the path for dar
~database()
database destructor (no implicit file saving)
void show_version(user_interaction &dialog, path chemin) const
list the archive where a give file is present
options for restoration from database
void set_dar_path(const std::string &chemin)
change the path to dar command
void set_permutation(archive_num src, archive_num dst)
change order of archive within the database
this is the base class of object that can be allocated on a memory pool
void show_files(user_interaction &dialog, archive_num num, const database_used_options &opt) const
list files which are present in a given archive
this file holds the options for database operations
void set_options(const std::vector< std::string > &opt)
change the default options given to dar when performing restoration
the database class defines the dar_manager 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
the class path is here to manipulate paths in the Unix notation: using'/'