 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
29 #include "../my_config.h"
71 const std::string & src,
75 bool x_furtive_read_mode);
76 cat_file(
const std::shared_ptr<user_interaction> & dialog,
88 virtual bool has_changed_since(
const cat_inode & ref,
92 void change_size(
const infinint & s)
const { *
size = s; };
93 infinint get_storage_size()
const {
return *
storage_size; };
94 void set_storage_size(
const infinint & s) { *
storage_size = s; };
114 std::shared_ptr<memory_file> delta_sig_mem,
115 U_I signature_block_size,
116 std::shared_ptr<memory_file> delta_ref,
117 const crc **checksum =
nullptr)
const;
119 void set_offset(
const infinint & r);
120 const infinint & get_offset()
const;
121 virtual unsigned char signature()
const override {
return 'f'; };
124 void set_crc(
const crc &c);
126 bool has_crc()
const {
return check !=
nullptr; };
128 void drop_crc() {
if(
check !=
nullptr) {
delete check;
check =
nullptr; } };
150 bool is_dirty()
const {
return dirty; };
151 void set_dirty(
bool value) {
dirty = value; };
219 U_I & block_len)
const;
240 virtual void sub_compare(
const cat_inode & other,
bool isolated_mode)
const override;
241 virtual void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const override;
244 enum { empty, from_path, from_cat } status;
262 void sub_compare_internal(
const cat_inode & other,
263 bool can_read_my_data,
264 bool can_read_other_data,
void clear_delta_signature_structure()
remove any information about delta signature
bool has_patch_result_crc() const
returns whether the object has a CRC corresponding to data (for s_saved, s_delta, and when delta sign...
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,...
char file_data_status_write
defines the datastructure to apply when writing down the data
get_data_mode
how to get data from archive
static constexpr U_8 FILE_DATA_IS_DIRTY
data modified while being saved
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 signatu...
void clear_delta_signature_only()
remove information about delta signature also associated CRCs if status is not s_delta
compression algo_read
which compression algorithm to use to read the file's data
compression
the different compression algorithm available
cat_delta_signature * delta_sig
delta signature and associated CRC
bool get_crc_size(infinint &val) const
returns true if crc is know and puts its width in argument
provide access to plain data, no skip to restore holes, provide instead zeroed bytes
bool same_data_as(const cat_file &other, bool check_data, const infinint &hourshift)
compare just data not inode information EA nor FSA
bool can_get_data() const
check whether the object will be able to provide a object using get_data() method
saved_status
data saved status for an entry
the arbitrary large positive integer class
virtual unsigned char signature() const override
inherited class signature
virtual cat_entree * clone() const override
a way to copy the exact type of an object even if pointed to by a parent class pointer
base object for all inode types, managed EA and FSA, dates, permissions, ownership,...
void will_have_delta_signature_structure()
prepare the object to receive a delta signature structure
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 will_have_delta_signature_available()
prepare the object to receive a delta signature structure including delta signature
bool has_patch_base_crc() const
returns whether the object has a base patch CRC (s_delta status objects)
void read_delta_signature_metadata() const
load metadata (and delta signature when in sequential mode) into memory
infinint * offset
start location of the data in 'loc'
char file_data_status_read
defines the datastructure to use when reading the data
the root class from all other inherite for any entry in the catalogue
bool has_delta_signature_structure() const
return whether the object has an associated delta signature structure
inode is saved but as delta binary from the content (delta signature) of what was found in the archiv...
archive_version read_ver
archive format used/to use
the root class for all cat_inode
class archive_version manages the version of the archive format
bool get_crc(const crc *&c) const
the argument is set the an allocated crc object the owned by the "cat_file" object,...
pure virtual class defining interface of a CRC object
bool dirty
true when a file has been modified at the time it was saved
infinint * size
size of the data (uncompressed)
bool can_obtain_sig() const
the cat_delta_signature structure can only hold CRC without delta_signature, this call gives the situ...
bool has_delta_signature_available() const
return whether the object has an associated delta signature structure including a delta signature dat...
void dump_delta_signature(std::shared_ptr< memory_file > &sig, U_I sign_block_size, generic_file &where, bool small) const
write down to archive the given delta signature
void drop_delta_signature_data() const
drop the delta signature from memory (will not more be posible to be read, using read_delta_signature...
inode is saved in the archive
provide access to uncompressed data but sparse_file datastructure
virtual std::string get_description() const override
inherited class designation
bool has_same_delta_signature(const cat_file &ref) const
return true if ref and "this" have both equal delta signatures
static constexpr U_8 FILE_DATA_HAS_DELTA_SIG
delta signature is present
bool furtive_read_mode
used only when status equals "from_path"
the class path is here to manipulate paths in the Unix notation: using'/'
virtual bool operator==(const cat_entree &ref) const override
not used
virtual void post_constructor(const pile_descriptor &pdesc) override
let inherited classes build object's data after CRC has been read from file in small read mode
static constexpr U_8 FILE_DATA_WITH_HOLE
file's data contains hole datastructure
Memory_file is a generic_file class that only uses virtual memory.
compression algo_write
which compression algorithm to use to write down (merging) the file's data
this is the interface class from which all other data transfer classes inherit
provide access to full data (uncompressed, uses skip() to restore holes)
bool has_patch_result_crc() const
returns whether the object has a CRC corresponding to data (for s_saved, s_delta, and when delta sign...
comparison_fields
how to consider file change during comparison and incremental backup
bool delta_sig_read
whether delta sig has been read/initialized from filesystem
crc * check
crc computed on the data
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_base_crc() const
returns whether the object has a base patch CRC (s_delta status objects)
provide access to compressed data
the cat_delta_signature file class
void read_delta_signature(std::shared_ptr< memory_file > &delta_sig, U_I &block_len) const
fetch the delta signature from the archive
class used to manage binary delta signature in catalogue and archive
saved_status get_saved_status() const
obtain the saved status of the object
infinint * storage_size
how much data used in archive (after compression)
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
true if object has been created by sequential reading of an archive
std::string chemin
path to the data (when read from filesystem)
virtual generic_file * get_data(get_data_mode mode, std::shared_ptr< memory_file > delta_sig_mem, U_I signature_block_size, std::shared_ptr< memory_file > delta_ref, const crc **checksum=nullptr) const
returns a newly allocated object in read_only mode
libdar namespace encapsulate all libdar symbols