29 #include "../my_config.h"
57 static const U_8 FILE_DATA_WITH_HOLE = 0x01;
58 static const U_8 FILE_DATA_IS_DIRTY = 0x02;
63 const datetime & last_access,
64 const datetime & last_modif,
65 const datetime & last_change,
66 const std::string & src,
70 bool x_furtive_read_mode);
81 infinint get_size()
const {
return *size; };
82 void change_size(
const infinint & s)
const { *size = s; };
83 infinint get_storage_size()
const {
return *storage_size; };
84 void set_storage_size(
const infinint & s) { *storage_size = s; };
85 virtual generic_file *get_data(get_data_mode mode)
const;
89 unsigned char signature()
const {
return mk_signature(
'f', get_saved_status()); };
91 void set_crc(
const crc &c);
92 bool get_crc(
const crc * & c)
const;
93 bool has_crc()
const {
return check !=
nullptr; };
94 bool get_crc_size(infinint & val)
const;
95 void drop_crc() {
if(check !=
nullptr) {
delete check; check =
nullptr; } };
98 void set_sparse_file_detection_read(
bool val) {
if(status == from_cat)
throw SRC_BUG;
if(val) file_data_status_read |= FILE_DATA_WITH_HOLE;
else file_data_status_read &= ~FILE_DATA_WITH_HOLE; };
100 void set_sparse_file_detection_write(
bool val) {
if(val) file_data_status_write |= FILE_DATA_WITH_HOLE;
else file_data_status_write &= ~FILE_DATA_WITH_HOLE; };
103 bool get_sparse_file_detection_read()
const {
return (file_data_status_read & FILE_DATA_WITH_HOLE) != 0; };
104 bool get_sparse_file_detection_write()
const {
return (file_data_status_write & FILE_DATA_WITH_HOLE) != 0; };
108 compression get_compression_algo_read()
const {
return algo_read; };
110 compression get_compression_algo_write()
const {
return algo_write; };
113 void change_compression_algo_write(
compression x) { algo_write = x; };
117 bool is_dirty()
const {
return dirty; };
118 void set_dirty(
bool value) { dirty = value; };
121 void sub_compare(
const cat_inode & other,
bool isolated_mode)
const;
122 void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const;
125 enum { empty, from_path, from_cat } status;
131 infinint *storage_size;
137 bool furtive_read_mode;
138 char file_data_status_read;
139 char file_data_status_write;
void inherited_dump(const pile_descriptor &pdesc, bool small) const
inherited class may overload this method but shall first call the parent's inherited_dump() in the ov...
This is a pure virtual class that is used by libdar when interaction with the user is required...
cat_entree * clone() const
a way to copy the exact type of an object even if pointed to by a parent class pointer ...
memory_pool * get_pool() const
void post_constructor(const pile_descriptor &pdesc)
compression
the different compression algorithm available
this is the interface class from which all other data transfer classes inherit
unsigned char signature() const
inherited class signature
the root class for all cat_inode
base object for all inode types, managed EA and FSA, dates, permissions, ownership, ...
the arbitrary large positive integer class
class archive_version manages the version of the archive format
comparison_fields
flag used to only consider certain fields when comparing/restoring inodes
the root class from all other inherite for any entry in the catalogue
libdar namespace encapsulate all libdar symbols
the class path is here to manipulate paths in the Unix notation: using'/'