33#include "../my_config.h" 
   74    bool is_eod()
 const { 
return type == 
'z'; };
 
   79    const std::string & get_name()
 const { 
return my_name; };
 
   80    unsigned char get_type()
 const { 
return type; };
 
   81    bool is_dir()
 const { 
return type == 
'd'; };
 
   82    bool is_file()
 const { 
return type == 
'f'; };
 
   83    bool is_symlink()
 const { 
return type == 
'l'; };
 
   84    bool is_char_device()
 const { 
return type == 
'c'; };
 
   85    bool is_block_device()
 const { 
return type == 
'b'; };
 
   86    bool is_unix_socket()
 const { 
return type == 
's'; };
 
   87    bool is_named_pipe()
 const { 
return type == 
'p'; };
 
   88    bool is_hard_linked()
 const { 
return hard_link; };
 
   89    bool is_removed_entry()
 const { 
return type == 
'x'; };
 
   90    bool is_door_inode()
 const { 
return type == 
'o'; };
 
   91    bool is_empty_dir()
 const { 
return empty_dir; };
 
   96    std::string get_data_flag() 
const;
 
   97    saved_status get_data_status()
 const { 
return data_status; };
 
  101    std::string get_ea_flag() 
const;
 
  106    std::string get_fsa_flag() 
const;
 
  108    std::string get_uid(
bool try_resolving_name = 
false) 
const;
 
  109    std::string get_gid(
bool try_resolving_name = 
false) 
const;
 
  110    std::string get_perm() 
const;
 
  115    std::string get_last_access() 
const;
 
  116    std::string get_last_modif() 
const;
 
  117    std::string get_last_change() 
const;
 
  119    time_t get_last_access_s()
 const { 
return datetime2time_t(last_access); };
 
  120    time_t get_last_modif_s() 
const;
 
  121    time_t get_last_change_s()
 const { 
return datetime2time_t(last_change); };
 
  129    void get_last_access(datetime::time_unit tu, time_t & second, time_t & fraction)
 const 
  130    { last_access.
get_value(second, fraction, tu); }
 
  133    void get_last_modif(datetime::time_unit tu, time_t & second, time_t & fraction)
 const 
  137    void get_last_change(datetime::time_unit tu, time_t & second, time_t & fraction)
 const 
  138    { last_change.
get_value(second, fraction, tu); }
 
  140    std::string get_file_size(
bool size_in_bytes = 
true) 
const;
 
  141    std::string get_compression_ratio() 
const;
 
  142    std::string get_compression_ratio_flag() 
const;
 
  143    bool is_sparse()
 const { 
return sparse_file; };
 
  144    std::string get_sparse_flag()
 const { 
return sparse_file ? 
"[X]" : 
"[ ]"; };
 
  145    std::string get_compression_algo()
 const { 
return compression2string(compression_algo); };
 
  146    bool is_dirty()
 const { 
return dirty; };
 
  147    std::string get_link_target()
 const { 
return target; };
 
  148    std::string get_major() 
const;
 
  149    std::string get_minor() 
const;
 
  157    bool has_delta_signature()
 const { 
return delta_sig; };
 
  158    std::string get_delta_flag() 
const;
 
  173    bool get_archive_offset_for_data(U_64 & val) 
const;
 
  174    std::string get_archive_offset_for_data()
 const { 
return offset_for_data.
is_zero() ? 
"" : 
deci(offset_for_data).
human(); };
 
  190    bool get_archive_offset_for_EA(U_64 & val) 
const;
 
  191    std::string get_archive_offset_for_EA()
 const { 
return offset_for_EA.
is_zero() ? 
"" : 
deci(offset_for_EA).
human(); };
 
  195    bool get_storage_size_for_EA(U_64 & val) 
const;
 
  196    std::string get_storage_size_for_EA()
 const { 
return storage_size_for_EA.
is_zero() ? 
"" : 
deci(storage_size_for_EA).
human(); };
 
  204    bool get_archive_offset_for_FSA(U_64 & val) 
const;
 
  205    std::string get_archive_offset_for_FSA()
 const { 
return offset_for_FSA.
is_zero() ? 
"" : 
deci(offset_for_FSA).
human(); };
 
  209    bool get_storage_size_for_FSA(U_64 & val) 
const;
 
  210    std::string get_storage_size_for_FSA()
 const { 
return storage_size_for_FSA.
is_zero() ? 
"" : 
deci(storage_size_for_FSA).
human(); };
 
  230    std::string get_data_crc()
 const { 
return data_crc; };
 
  231    std::string get_delta_patch_base_crc()
 const { 
return patch_base_crc; };
 
  232    std::string get_delta_patch_result_crc()
 const { 
return patch_result_crc; };
 
  236    void set_name(
const std::string & val) { my_name = val; };
 
  237    void set_type(
unsigned char val) { type = val; };
 
  238    void set_removed_type(
unsigned char val);
 
  239    void set_hard_link(
bool val) { hard_link = val; };
 
  240    void set_uid(
const infinint & val) { uid = val; };
 
  241    void set_gid(
const infinint & val) { gid = val; };
 
  242    void set_perm(U_16 val) { perm = val; };
 
  243    void set_last_access(
const datetime & val) { last_access = val; };
 
  244    void set_last_modif(
const datetime & val) { 
last_modif = val; };
 
  245    void set_removal_date(
const datetime & val);
 
  246    void set_saved_status(
saved_status val) { data_status = val; };
 
  248    void set_last_change(
const datetime & val) { last_change = val; };
 
  250    void set_file_size(
const infinint & val) { file_size = val; };
 
  251    void set_is_sparse_file(
bool val) { sparse_file = val; };
 
  252    void set_compression_algo(
compression val) { compression_algo = val; };
 
  253    void set_dirtiness(
bool val) { dirty = val; };
 
  254    void set_link_target(
const std::string & val) { 
target = val; };
 
  255    void set_major(
int val) { major = val; };
 
  256    void set_minor(
int val) { minor = val; };
 
  257    void set_slices(
const range & sl) { slices = sl; };
 
  258    void set_delta_sig(
bool val) { delta_sig = val; };
 
  259    void set_archive_offset_for_data(
const infinint & val) { offset_for_data = val; };
 
  260    void set_storage_size_for_data(
const infinint & val) { storage_size_for_data = val; };
 
  261    void set_archive_offset_for_EA(
const infinint & val) { offset_for_EA = val; };
 
  262    void set_storage_size_for_EA(
const infinint & val) { storage_size_for_EA = val; };
 
  263    void set_archive_offset_for_FSA(
const infinint & val) { offset_for_FSA = val; };
 
  264    void set_storage_size_for_FSA(
const infinint & val) { storage_size_for_FSA = val; };
 
  265    void set_ea(
const ea_attributs & arg);
 
  266    void set_etiquette(
const infinint & arg) { 
etiquette = arg; };
 
  267    void set_fsa_scope(
const fsa_scope & arg) { fsa_sc = arg; };
 
  268    void set_data_crc(
const crc & ptr);
 
  269    void set_delta_patch_base_crc(
const crc & ptr);
 
  270    void set_delta_patch_result_crc(
const crc & ptr);
 
  271    void set_empty_dir(
bool val) { 
if(!is_dir()) 
throw SRC_BUG; empty_dir = val; };
 
  282    mutable bool full_date;
 
  283    datetime last_access;
 
  305    std::deque<std::string> ea;
 
  306    mutable std::deque<std::string>::const_iterator it_ea;
 
  308    std::string data_crc;
 
  309    std::string patch_base_crc;
 
  310    std::string patch_result_crc;
 
  313    static time_t datetime2time_t(
const datetime & val);
 
the different status of data and EA
 
bool get_value(time_t &second, time_t &subsecond, time_unit unit) const
return a time as time_t arguments
 
decimal class, convert infinint from and to decimal represention
 
std::string human() const
this produce a string from the decimal stored in the current object
 
the arbitrary large positive integer class
 
void set_fully_detailed_dates(bool mode) const
 
bool get_archive_offset_for_FSA(infinint &val) const
offset in byte where to find the first byte of Filesystem Specific Attributes
 
void get_last_modif(datetime::time_unit tu, time_t &second, time_t &fraction) const
yet an alternative method to get the last modification date (see get_last_access() for details)
 
bool get_storage_size_for_data(infinint &val) const
amount of byte used to store the file's data
 
void get_ea_reset_read() const
reset the reading of Extended Attributes names
 
void get_last_access(datetime::time_unit tu, time_t &second, time_t &fraction) const
yet an alternative method to get last access time
 
std::string get_removal_date() const
for removed_entry only
 
void get_last_change(datetime::time_unit tu, time_t &second, time_t &fraction) const
yet an alternative method to get the last change date (see get_last_access() for details)
 
fsa_scope get_fsa_scope() const
this is the hard-link ID, only valid for hard linked entries
 
bool is_eod() const
method used to know whether the returned entry signals a End of Directory
 
datetime last_modif
also used to store removal_date for removed entries
 
infinint etiquette
hard link identification
 
std::string target
target[0] used to store signature of removed entry for removed entries
 
bool get_storage_size_for_EA(infinint &val) const
amount of byte used to store the file's EA
 
unsigned char get_removed_type() const
valid only for removed_entries
 
bool get_ea_read_next(std::string &key) const
read the next Extended Attribute name
 
bool get_storage_size_for_FSA(infinint &val) const
amount of byte used to store the file's FSA
 
const range & get_slices() const
provides slice information
 
time_t get_removal_date_s() const
for removed_entry only
 
bool get_archive_offset_for_EA(infinint &val) const
offset in byte whert to find the first byte of Extended Attributes
 
bool get_archive_offset_for_data(infinint &val) const
offset in byte where to find first byte of data
 
stores a range of integers or a set of ranges
 
compression parameters for API
 
this file contains the definition of class datetime that stores unix times in a portable way
 
manages the decimal representation of infinint
 
contains a set of routines to manage EA values associated to a file
 
filesystem specific attributes available families and fsa_scope definition
 
std::string compression2string(compression c)
convert a compression to its string representation
 
std::set< fsa_family > fsa_scope
set of fsa families
 
compression
the different compression algorithm available
 
fsa_saved_status
FSA saved status for an entry.
 
saved_status
data saved status for an entry
 
ea_saved_status
EA saved status for an entry.
 
@ saved
inode is saved in the archive
 
@ delta
inode is saved but as delta binary from the content (delta signature) of what was found in the archiv...
 
@ none
no EA present for this inode in filesystem
 
@ removed
EA were present in the reference version, but not present anymore.
 
@ full
EA present in filesystem and attached to this inode.
 
switch module to limitint (32 ou 64 bits integers) or infinint
 
are defined here basic integer types that tend to be portable
 
libdar namespace encapsulate all libdar symbols
 
class than provide a way to manipulate and represent range of integer numbers (infinint)