![]() |
Disk ARchive
2.6.2
Full featured and portable backup and archiving tool
|
the cat_delta_signature file class More...
#include <cat_delta_signature.hpp>
Public Member Functions | |
| cat_delta_signature (generic_file *f, compressor *c) | |
| constructor to read an object (using read() later on) from filesystem More... | |
| cat_delta_signature () | |
| constructor to write an object to filesytem (using dump_* methods later on) | |
| cat_delta_signature (const cat_delta_signature &ref) | |
| copy constructor | |
| cat_delta_signature (cat_delta_signature &&ref) noexcept | |
| move constructor | |
| cat_delta_signature & | operator= (const cat_delta_signature &ref) |
| assignement operator | |
| cat_delta_signature & | operator= (cat_delta_signature &&ref) noexcept |
| move assignment operator | |
| ~cat_delta_signature () | |
| destructor | |
| void | read (bool sequential_read) |
| bool | can_obtain_sig () const |
| the cat_delta_signature structure can only hold CRC without delta_signature, this call gives the situation about that point | |
| std::shared_ptr< memory_file > | obtain_sig () const |
| provide a memory_file object which the caller has the duty to destroy after use More... | |
| void | drop_sig () const |
| drop signature but keep metadata available More... | |
| void | will_have_signature () |
| give the object where to fetch from the delta signature, object must exist up to the next call to dump_data More... | |
| void | set_sig (const std::shared_ptr< memory_file > &ptr) |
| the object pointed to by ptr must stay available when calling dump_data()/dump_metadata() later on | |
| void | set_sig () |
| variante used when the delta_signature object will only contain CRCs (no delta signature) | |
| void | dump_data (generic_file &f, bool sequential_mode) const |
| write down the data eventually with sequential read mark followed by delta sig metadata | |
| void | dump_metadata (generic_file &f) const |
| write down the delta_signature metadata for catalogue | |
| bool | has_patch_base_crc () const |
| returns whether the object has a base patch CRC (s_delta status objects) | |
| bool | get_patch_base_crc (const crc *&c) const |
| returns the CRC of the file to base the patch on, for s_delta objects | |
| void | set_patch_base_crc (const crc &c) |
| set the reference CRC of the file to base the patch on, for s_detla objects | |
| bool | has_patch_result_crc () const |
| returns whether the object has a CRC corresponding to data (for s_saved, s_delta, and when delta signature is present) | |
| bool | get_patch_result_crc (const crc *&c) const |
| returns the CRC the file will have once restored or patched (for s_saved, s_delta, and when delta signature is present) | |
| void | set_patch_result_crc (const crc &c) |
| set the CRC the file will have once restored or patched (for s_saved, s_delta, and when delta signature is present) | |
| void | clear () |
| reset the object | |
Private Member Functions | |
| void | init () noexcept |
| void | copy_from (const cat_delta_signature &ref) |
| void | move_from (cat_delta_signature &&ref) noexcept |
| void | destroy () noexcept |
| void | fetch_data () const |
Private Attributes | |
| crc * | patch_base_check |
| associated CRC for the file this signature has been computed on | |
| infinint | delta_sig_size |
| size of the data to setup "sig" (set to zero when reading in sequential mode, sig is then setup on-fly) | |
| infinint | delta_sig_offset |
| where to read data from to setup "sig" (set to zero when read in sequential mode, sig is setup on-fly) | |
| std::shared_ptr< memory_file > | sig |
| the signature data, if set nullptr it will be fetched from f in direct access mode only | |
| crc * | patch_result_check |
| associated CRC | |
| generic_file * | src |
| where to read data from | |
| compressor * | zip |
| needed to disable compression when reading delta signature data from an archive | |
the cat_delta_signature file class
this class works in to implicit modes
Definition at line 90 of file cat_delta_signature.hpp.
| libdar::cat_delta_signature::cat_delta_signature | ( | generic_file * | f, |
| compressor * | c | ||
| ) |
constructor to read an object (using read() later on) from filesystem
| [in] | f | where to read the data from, used when calling read() later on. f must not be set to nullptr and the pointed to object must survive this cat_delta_signature object |
| [in] | c | points to the compressor layer in order to suspend compression when reading data (metadata will be read compressed or not depending on the its location (in-lined or in the catalogue at end of archive) |
|
inline |
drop signature but keep metadata available
Definition at line 141 of file cat_delta_signature.hpp.
References sig.
| std::shared_ptr<memory_file> libdar::cat_delta_signature::obtain_sig | ( | ) | const |
provide a memory_file object which the caller has the duty to destroy after use
Referenced by can_obtain_sig().
| void libdar::cat_delta_signature::read | ( | bool | sequential_read | ) |
read the metadata of the object from the generic_file given at construction time
Referenced by ~cat_delta_signature().
|
inline |
give the object where to fetch from the delta signature, object must exist up to the next call to dump_data
Definition at line 150 of file cat_delta_signature.hpp.
References delta_sig_size, and set_sig().
1.8.13