![]() |
Disk ARchive
2.5.3
Full featured and portable backup and archiving tool
|
the archive class realizes the most general operations on archives More...
#include <archive.hpp>
Inherits libdar::on_pool.
Public Member Functions | |
archive (user_interaction &dialog, const path &chem, const std::string &basename, const std::string &extension, const archive_options_read &options) | |
this constructor opens an already existing archive (for reading) [this is the "read" constructor] More... | |
archive (user_interaction &dialog, const path &fs_root, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_create &options, statistics *progressive_report) | |
this constuctor create an archive (full or differential) [this is the "create" constructor] More... | |
archive (user_interaction &dialog, const path &sauv_path, archive *ref_arch, const std::string &filename, const std::string &extension, const archive_options_isolate &options) | |
archive (user_interaction &dialog, const path &sauv_path, archive *ref_arch1, const std::string &filename, const std::string &extension, const archive_options_merge &options, statistics *progressive_report) | |
this constructor builds an archive from two given archive [this is the "merge" constructor] More... | |
archive (const archive &ref) | |
copy constructor (not implemented, throw an exception if called explicitely or implicitely) More... | |
archive & | operator= (const archive &ref) |
~archive () throw (Ebug) | |
the destructor | |
statistics | op_extract (user_interaction &dialog, const path &fs_root, const archive_options_extract &options, statistics *progressive_report) |
extraction of data from an archive More... | |
void | summary (user_interaction &dialog) |
void | op_listing (user_interaction &dialog, const archive_options_listing &options) |
listing of the archive contents More... | |
statistics | op_diff (user_interaction &dialog, const path &fs_root, const archive_options_diff &options, statistics *progressive_report) |
archive comparison with filesystem More... | |
statistics | op_test (user_interaction &dialog, const archive_options_test &options, statistics *progressive_report) |
test the archive integrity More... | |
void | op_isolate (user_interaction &dialog, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_isolate &options) |
this methodes isolates the catalogue of a the current archive into a separated archive More... | |
bool | get_children_of (user_interaction &dialog, const std::string &dir) |
getting information about a given directory More... | |
const std::vector< list_entry > | get_children_in_table (const std::string &dir) const |
bool | has_subdirectory (const std::string &dir) const |
returns true if the pointed directory has one or more subdirectories | |
const entree_stats | get_stats () const |
retrieving statistics about archive contents | |
const std::list< signator > & | get_signatories () const |
retrieving signature information about the archive | |
void | init_catalogue (user_interaction &dialog) const |
const catalogue & | get_catalogue () const |
gives access to internal catalogue (not to be used from the API) More... | |
const catalogue & | get_catalogue (user_interaction &dialog) const |
gives access to internal catalogue (not to be used from the API) even in sequential read mode | |
void | drop_all_filedescriptors () |
closes all filedescriptors and associated data, just keep the catalogue More... | |
void | drop_all_filedescriptors (user_interaction &dialog) |
closes all filedescriptors and associated even when in sequential read mode | |
void | set_to_unsaved_data_and_FSA () |
change all inode as unsaved (equal to differential backup with no change met) | |
std::string | free_and_check_memory () const |
![]() | |
void * | operator new (size_t n_byte) |
void * | operator new (size_t n_byte, const std::nothrow_t ¬hrow_value) |
void * | operator new[] (size_t n_byte) |
void * | operator new[] (size_t n_byte, const std::nothrow_t ¬hrow_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 | |
![]() | |
memory_pool * | get_pool () const |
template<class T > | |
void | meta_new (T *&ptr, size_t num) |
template<class T > | |
void | meta_delete (T *ptr) |
the archive class realizes the most general operations on archives
the operations corresponds to the one the final user expects, these are the same abstraction level as the operation realized by the DAR command line tool.
Definition at line 56 of file archive.hpp.
libdar::archive::archive | ( | user_interaction & | dialog, |
const path & | chem, | ||
const std::string & | basename, | ||
const std::string & | extension, | ||
const archive_options_read & | options | ||
) |
this constructor opens an already existing archive (for reading) [this is the "read" constructor]
[in,out] | dialog | for user interaction |
[in] | chem | the path where to look for slices |
[in] | basename | the slices basename of the archive to read ("-" means standard input, and activates the output_pipe and input_pipe arguments) |
[in] | extension | the slice extension (should always be "dar") |
[in] | options | A set of option to use to read the archive |
libdar::archive::archive | ( | user_interaction & | dialog, |
const path & | fs_root, | ||
const path & | sauv_path, | ||
const std::string & | filename, | ||
const std::string & | extension, | ||
const archive_options_create & | options, | ||
statistics * | progressive_report | ||
) |
this constuctor create an archive (full or differential) [this is the "create" constructor]
[in,out] | dialog | for user interaction |
[in] | fs_root | the filesystem to take as root for the backup |
[in] | sauv_path | the path where to create slices |
[in] | filename | base name of the slices. If "-" is given the archive will be produced in standard output |
[in] | extension | slices extension ("dar") |
[in] | options | optional parameters to use for the operation |
[out] | progressive_report | statistics about the operation, considering the treated files (nullptr can be given if you don't want to use this feature) |
libdar::archive::archive | ( | user_interaction & | dialog, |
const path & | sauv_path, | ||
archive * | ref_arch, | ||
const std::string & | filename, | ||
const std::string & | extension, | ||
const archive_options_isolate & | options | ||
) |
WARNING this is a deprecated constructor, use the op_isolate() method for better performances
libdar::archive::archive | ( | user_interaction & | dialog, |
const path & | sauv_path, | ||
archive * | ref_arch1, | ||
const std::string & | filename, | ||
const std::string & | extension, | ||
const archive_options_merge & | options, | ||
statistics * | progressive_report | ||
) |
this constructor builds an archive from two given archive [this is the "merge" constructor]
[in,out] | dialog | for user interaction |
[in] | sauv_path | the path where to create slices |
[in] | ref_arch1 | the first mandatory input archive (the second is optional and provided within the 'option' argument |
[in] | filename | base name of the slices. If "-" is given the archive will be produced in standard output |
[in] | extension | slices extension ("dar") |
[in] | options | optional parameters to be used for the operation |
[out] | progressive_report | statistics about the operation, considering the treated files (nullptr can be given if you don't want to use this feature) |
|
inline |
copy constructor (not implemented, throw an exception if called explicitely or implicitely)
Definition at line 146 of file archive.hpp.
References libdar::dar_gettext().
void libdar::archive::drop_all_filedescriptors | ( | ) |
closes all filedescriptors and associated data, just keep the catalogue
Referenced by get_signatories().
std::string libdar::archive::free_and_check_memory | ( | ) | const |
check that the internal memory_pool has all its blocks properly freeed
Referenced by set_to_unsaved_data_and_FSA().
const catalogue& libdar::archive::get_catalogue | ( | ) | const |
gives access to internal catalogue (not to be used from the API)
Referenced by get_signatories().
const std::vector<list_entry> libdar::archive::get_children_in_table | ( | const std::string & | dir | ) | const |
getting information about the given directory (alternative to get_children_of)
[in] | dir | relative path the directory to get information about, use empty string for root directory |
Referenced by ~archive().
bool libdar::archive::get_children_of | ( | user_interaction & | dialog, |
const std::string & | dir | ||
) |
getting information about a given directory
[in,out] | dialog | for user interaction |
[in] | dir | relative path the directory to get information about |
Referenced by ~archive().
void libdar::archive::init_catalogue | ( | user_interaction & | dialog | ) | const |
necessary to get the catalogue fully loaded in memory in any situation in particular in sequential reading mode
Referenced by get_signatories().
statistics libdar::archive::op_diff | ( | user_interaction & | dialog, |
const path & | fs_root, | ||
const archive_options_diff & | options, | ||
statistics * | progressive_report | ||
) |
archive comparison with filesystem
[in,out] | dialog | for user interaction |
[in] | fs_root | the filesystem to take as root for the comparison |
[in] | options | optional parameters to be used with the operation |
[in,out] | progressive_report | points to an already existing statistics object that can be consulted at any time during the call (see the returned value to know the useful fields and their meining), nullptr can be given in argument if you only need the result at the end of the operation through the returned value of this call this should speed up the operation by a little amount. |
Referenced by ~archive().
statistics libdar::archive::op_extract | ( | user_interaction & | dialog, |
const path & | fs_root, | ||
const archive_options_extract & | options, | ||
statistics * | progressive_report | ||
) |
extraction of data from an archive
[in,out] | dialog | for user interaction |
[in] | fs_root | the filesystem to take as root for the restoration |
[in] | options | optional parameter to be used for the operation |
[in,out] | progressive_report | points to an already existing statistics object that can be consulted at any time during the call (see the returned value to know the useful fields and their meining), nullptr can be given in argument if you only need the result at the end of the operation through the returned value of this call this should speed up the operation by a little amount. |
Referenced by ~archive().
void libdar::archive::op_isolate | ( | user_interaction & | dialog, |
const path & | sauv_path, | ||
const std::string & | filename, | ||
const std::string & | extension, | ||
const archive_options_isolate & | options | ||
) |
this methodes isolates the catalogue of a the current archive into a separated archive
[in,out] | dialog | for user interaction |
[in] | sauv_path | the path where to create slices |
[in] | filename | base name of the slices ("-" for standard output) |
[in] | extension | slices extension ("dar") |
[in] | options | optional parameters to use for the operation |
Referenced by ~archive().
void libdar::archive::op_listing | ( | user_interaction & | dialog, |
const archive_options_listing & | options | ||
) |
listing of the archive contents
[in,out] | dialog | for user interaction |
[in] | options | list of optional parameters to use for the operation |
Referenced by ~archive().
statistics libdar::archive::op_test | ( | user_interaction & | dialog, |
const archive_options_test & | options, | ||
statistics * | progressive_report | ||
) |
test the archive integrity
[in,out] | dialog | for user interaction |
[in] | options | optional parameter to use for the operation |
[in,out] | progressive_report | points to an already existing statistics object that can be consulted at any time during the call (see the returned value to know the useful fields and their meining), nullptr can be given in argument if you only need the result at the end of the operation through the returned value of this call this should speed up the operation by a little amount. |
Referenced by ~archive().
void libdar::archive::summary | ( | user_interaction & | dialog | ) |