![]() |
Disk ARchive 2.7.14
Full featured and portable backup and archiving tool
|
the archive class realizes the most general operations on archives More...
#include <archive.hpp>
Inherited by libdar5::archive, and libdar5::archive.
Classes | |
class | i_archive |
the archive::i_archive class implements the most general operations on archives More... | |
Public Member Functions | |
archive (const std::shared_ptr< 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] | |
archive (const std::shared_ptr< 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] | |
archive (const std::shared_ptr< user_interaction > &dialog, const path &sauv_path, std::shared_ptr< 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] | |
archive (const std::shared_ptr< user_interaction > &dialog, const path &chem_src, const std::string &basename_src, const std::string &extension_src, const archive_options_read &options_read, const path &chem_dst, const std::string &basename_dst, const std::string &extension_dst, const archive_options_repair &options_repair) | |
this constructor create a new archive from a damaged one [this is the "repair" constructor] | |
archive (const archive &ref)=delete | |
copy constructor (not implemented, throw an exception if called explicitely or implicitely) | |
archive (archive &&ref)=delete | |
archive & | operator= (const archive &ref)=delete |
archive & | operator= (archive &&ref)=delete |
~archive () | |
the destructor | |
statistics | op_extract (const path &fs_root, const archive_options_extract &options, statistics *progressive_report) |
extraction of data from an archive | |
void | summary () |
display a summary of the archive | |
archive_summary | summary_data () |
same information as summary() but as broken out data | |
void | op_listing (archive_listing_callback callback, void *context, const archive_options_listing &options) const |
listing of the archive contents | |
statistics | op_diff (const path &fs_root, const archive_options_diff &options, statistics *progressive_report) |
archive comparison with filesystem | |
statistics | op_test (const archive_options_test &options, statistics *progressive_report) |
test the archive integrity | |
void | op_isolate (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 | |
bool | get_children_of (archive_listing_callback callback, void *context, const std::string &dir, bool fetch_ea=false) |
getting information about a given directory | |
const std::vector< list_entry > | get_children_in_table (const std::string &dir, bool fetch_ea=false) const |
getting information about the given directory (alternative to get_children_of) | |
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 () const |
void | drop_all_filedescriptors () |
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) | |
U_64 | get_first_slice_header_size () const |
get the first slice header | |
U_64 | get_non_first_slice_header_size () const |
get the non first slice header | |
archive (const std::shared_ptr< 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] | |
archive (const std::shared_ptr< 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] | |
archive (const std::shared_ptr< user_interaction > &dialog, const path &sauv_path, std::shared_ptr< 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] | |
archive (const std::shared_ptr< user_interaction > &dialog, const path &chem_src, const std::string &basename_src, const std::string &extension_src, const archive_options_read &options_read, const path &chem_dst, const std::string &basename_dst, const std::string &extension_dst, const archive_options_repair &options_repair) | |
this constructor create a new archive from a damaged one [this is the "repair" constructor] | |
archive (const archive &ref)=delete | |
copy constructor (not implemented, throw an exception if called explicitely or implicitely) | |
archive (archive &&ref)=delete | |
archive & | operator= (const archive &ref)=delete |
archive & | operator= (archive &&ref)=delete |
~archive () | |
the destructor | |
statistics | op_extract (const path &fs_root, const archive_options_extract &options, statistics *progressive_report) |
extraction of data from an archive | |
void | summary () |
display a summary of the archive | |
archive_summary | summary_data () |
same information as summary() but as broken out data | |
void | op_listing (archive_listing_callback callback, void *context, const archive_options_listing &options) const |
listing of the archive contents | |
statistics | op_diff (const path &fs_root, const archive_options_diff &options, statistics *progressive_report) |
archive comparison with filesystem | |
statistics | op_test (const archive_options_test &options, statistics *progressive_report) |
test the archive integrity | |
void | op_isolate (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 | |
bool | get_children_of (archive_listing_callback callback, void *context, const std::string &dir, bool fetch_ea=false) |
getting information about a given directory | |
const std::vector< list_entry > | get_children_in_table (const std::string &dir, bool fetch_ea=false) const |
getting information about the given directory (alternative to get_children_of) | |
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 () const |
void | drop_all_filedescriptors () |
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) | |
U_64 | get_first_slice_header_size () const |
get the first slice header | |
U_64 | get_non_first_slice_header_size () const |
get the non first slice header | |
Private Attributes | |
std::shared_ptr< i_archive > | pimpl |
Friends | |
class | database |
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 64 of file dar64-2.7.14-win64/include/dar/archive.hpp.
libdar::archive::archive | ( | const std::shared_ptr< 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 | ( | const std::shared_ptr< 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 | ( | const std::shared_ptr< user_interaction > & | dialog, |
const path & | sauv_path, | ||
std::shared_ptr< 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) |
libdar::archive::archive | ( | const std::shared_ptr< user_interaction > & | dialog, |
const path & | chem_src, | ||
const std::string & | basename_src, | ||
const std::string & | extension_src, | ||
const archive_options_read & | options_read, | ||
const path & | chem_dst, | ||
const std::string & | basename_dst, | ||
const std::string & | extension_dst, | ||
const archive_options_repair & | options_repair ) |
this constructor create a new archive from a damaged one [this is the "repair" constructor]
[in,out] | dialog | for user interaction |
[in] | chem_src | the path where to look for slices of the archive to repair |
[in] | basename_src | the slices basename of the archive to repair |
[in] | extension_src | the slices extension of the archive to repair |
[in] | options_read | the set of option to use to read the archive repair |
[in] | chem_dst | the path where to write the repaired archive |
[in] | basename_dst | the slices basename of the repaired archive |
[in] | extension_dst | the slices extension of the repaired archive |
[in] | options_repair | the set of option to use to write the repaired archive |
copy constructor (not implemented, throw an exception if called explicitely or implicitely)
void libdar::archive::drop_all_filedescriptors | ( | ) |
closes all filedescriptors and associated even when in sequential read mode
const std::vector< list_entry > libdar::archive::get_children_in_table | ( | const std::string & | dir, |
bool | fetch_ea = false ) 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 |
[in] | fetch_ea | whether to fetch Extended Attributes relative information in each returned list_entry (not possible in sequential read mode) |
bool libdar::archive::get_children_of | ( | archive_listing_callback | callback, |
void * | context, | ||
const std::string & | dir, | ||
bool | fetch_ea = false ) |
getting information about a given directory
[in] | callback | callback function used to provide data in splitted field |
[in] | context | will be passed as first argument of the callback as is provided here |
[in] | dir | relative path the directory to get information about |
[in] | fetch_ea | whether to look for EA (not possible in sequential read mode) |
U_64 libdar::archive::get_first_slice_header_size | ( | ) | const |
get the first slice header
get_first_slice_header_size() and get_non_first_slice_header_size() can be used to translate from archive offset as reported by the list_entry::get_archive_offset_*() methods to file offset. This can be done by adding the first_slice_header_size to the archive offset, if the resulting number is larger than the first slice size, substract the it and add the non_first_slice header_size, and so on. This way you can determin the slice number to look into and the file offset in that file. Unit for all value is the byte (= octet).
U_64 libdar::archive::get_non_first_slice_header_size | ( | ) | const |
get the non first slice header
void libdar::archive::init_catalogue | ( | ) | const |
necessary to get the catalogue fully loaded in memory in any situation in particular in sequential reading mode
statistics libdar::archive::op_diff | ( | const path & | fs_root, |
const archive_options_diff & | options, | ||
statistics * | progressive_report ) |
archive comparison with filesystem
[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. |
statistics libdar::archive::op_extract | ( | const path & | fs_root, |
const archive_options_extract & | options, | ||
statistics * | progressive_report ) |
extraction of data from an archive
[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. |
void libdar::archive::op_isolate | ( | 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] | 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 |
void libdar::archive::op_listing | ( | archive_listing_callback | callback, |
void * | context, | ||
const archive_options_listing & | options ) const |
listing of the archive contents
[in] | callback | callback function used to provide data in splitted field (not used if null is given) |
[in] | context | will be passed as is to the last argument of the provided callback |
[in] | options | list of optional parameters to use for the operation |
statistics libdar::archive::op_test | ( | const archive_options_test & | options, |
statistics * | progressive_report ) |
test the archive integrity
[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. |
void libdar::archive::summary | ( | ) |
display a summary of the archive