![]() |
Disk ARchive 2.7.18
Full featured and portable backup and archiving tool
|
class cat_signature combines the cat_entree::signature() of the object with its saved_status and read and store this combinason More...
#include <cat_signature.hpp>
Public Member Functions | |
| cat_signature (unsigned char original, saved_status status) | |
| set a signature from running libdar | |
| cat_signature (generic_file &f, const archive_version &reading_ver) | |
| set a signature from an disk archive | |
| bool | read (generic_file &f, const archive_version &reading_ver) |
| read a signature from archive for an existing cat_signature object (overwrite its value) | |
| void | write (generic_file &f) |
| bool | get_base_and_status (unsigned char &base, saved_status &saved) const |
| provide typ and status as read from the archive | |
Static Public Member Functions | |
| static bool | compatible_signature (unsigned char a, unsigned char b) |
Private Attributes | |
| unsigned char | field |
| stores file type and status information | |
Static Private Attributes | |
| static constexpr U_8 | SAVED_FAKE_BIT = 0x80 |
| static constexpr U_8 | SAVED_NON_DELTA_BIT = 0x40 |
class cat_signature combines the cat_entree::signature() of the object with its saved_status and read and store this combinason
historically these two fields were saved on a single byte, but as libdar received new feature it was to narrow where from this class to transparently manage this field evolution
Definition at line 48 of file cat_signature.hpp.
| bool libdar::cat_signature::get_base_and_status | ( | unsigned char & | base, |
| saved_status & | saved ) const |
provide typ and status as read from the archive
| [out] | base | the signature() of the entry |
| [out] | saved | the get_saved_status() of the entry |
| bool libdar::cat_signature::read | ( | generic_file & | f, |
| const archive_version & | reading_ver ) |
read a signature from archive for an existing cat_signature object (overwrite its value)
| [in] | f | where to read data from |
| [in] | reading_ver | which format to expect |
|
private |
stores file type and status information
adding features after features, the FAKE status used in isolated catalogues used the bit 8 (ASCII used 7 lower bits only).
but while adding the delta-diff feature it has been realized that 3 bits could be used beside information type to store the status thanks to the way ASCI encodes letters: the 5 lower bits encode the letter nature, remains the bits 6, 7 and 8 to encode the status of the inode:
Definition at line 107 of file cat_signature.hpp.
|
staticconstexprprivate |
Definition at line 77 of file cat_signature.hpp.
|
staticconstexprprivate |
Definition at line 78 of file cat_signature.hpp.