27 #ifndef LIST_ENTRY_HPP
28 #define LIST_ENTRY_HPP
33 #include <sys/types.h>
47 #include "../my_config.h"
74 const std::string & get_name()
const {
return my_name; };
75 unsigned char get_type()
const {
return type; };
76 bool is_dir()
const {
return type ==
'd'; };
77 bool is_file()
const {
return type ==
'f'; };
78 bool is_symlink()
const {
return type ==
'l'; };
79 bool is_char_device()
const {
return type ==
'c'; };
80 bool is_block_device()
const {
return type ==
'b'; };
81 bool is_unix_socket()
const {
return type ==
's'; };
82 bool is_named_pipe()
const {
return type ==
'p'; };
83 bool is_hard_linked()
const {
return hard_link; };
84 bool is_removed_entry()
const {
return type ==
'x'; };
85 bool is_door_inode()
const {
return type ==
'o'; };
87 bool has_data_present_in_the_archive()
const {
return data_status == s_saved; };
88 bool has_EA()
const {
return ea_status != inode::ea_none && ea_status != inode::ea_removed; };
89 bool has_EA_saved_in_the_archive()
const {
return ea_status == inode::ea_full; };
91 std::string get_uid()
const {
return deci(uid).
human(); };
92 std::string get_gid()
const {
return deci(gid).
human(); };
94 std::string get_last_access()
const {
return last_access != 0 ?
tools_display_date(last_access) :
""; };
95 time_t get_last_access_s()
const {
return infinint2time_t(last_access); };
96 std::string get_last_modif()
const {
return last_modif != 0 ?
tools_display_date(last_modif) :
""; };
97 time_t get_last_modif_s()
const {
return infinint2time_t(last_modif); };
98 std::string get_last_change()
const {
return last_change != 0 ?
tools_display_date(last_change) :
""; };
99 time_t get_last_change_s()
const {
return infinint2time_t(last_change); };
100 std::string get_file_size()
const {
return deci(file_size).
human(); };
102 bool is_sparse()
const {
return sparse_file; };
103 std::string get_compression_algo()
const {
return compression2string(compression_algo); };
104 bool is_dirty()
const {
return dirty; };
105 std::string get_link_target()
const {
return target; };
106 std::string get_major()
const {
return tools_int2str(major); };
107 std::string get_minor()
const {
return tools_int2str(minor); };
112 void set_name(
const std::string & val) { my_name = val; };
113 void set_type(
unsigned char val) { type = val; };
114 void set_hard_link(
bool val) { hard_link = val; };
115 void set_uid(
const infinint & val) { uid = val; };
116 void set_gid(
const infinint & val) { gid = val; };
117 void set_perm(U_16 val) { perm = val; };
118 void set_last_access(
const infinint & val) { last_access = val; };
119 void set_last_modif(
const infinint & val) { last_modif = val; };
120 void set_saved_status(saved_status val) { data_status = val; };
121 void set_ea_status(inode::ea_status val) { ea_status = val; };
122 void set_last_change(
const infinint & val) { last_change = val; };
123 void set_file_size(
const infinint & val) { file_size = val; };
124 void set_storage_size(
const infinint & val) { storage_size = val; };
125 void set_is_sparse_file(
bool val) { sparse_file = val; };
126 void set_compression_algo(
compression val) { compression_algo = val; };
127 void set_dirtiness(
bool val) { dirty = val; };
128 void set_link_target(
const std::string & val) { target = val; };
129 void set_major(
int val) { major = val; };
130 void set_minor(
int val) { minor = val; };
141 saved_status data_status;
142 inode::ea_status ea_status;
153 static time_t infinint2time_t(
infinint val);
are defined here basic integer types that tend to be portable
decimal class, convert infinint from and to decimal represention
switch module to limitint (32 ou 64 bits integers) or infinint
manages the decimal representation of infinint
compression
the different compression algorithm available
compression engine implementation
the arbitrary large positive integer class
std::string human() const
this produce a string fromr the decimal stored in the current object
here is defined the many classed which is build of the catalogue