27 #ifndef LIST_ENTRY_HPP
28 #define LIST_ENTRY_HPP
32 #include "../my_config.h"
59 const std::string & get_name()
const {
return my_name; };
60 unsigned char get_type()
const {
return type; };
61 bool is_dir()
const {
return type ==
'd'; };
62 bool is_file()
const {
return type ==
'f'; };
63 bool is_symlink()
const {
return type ==
'l'; };
64 bool is_char_device()
const {
return type ==
'c'; };
65 bool is_block_device()
const {
return type ==
'b'; };
66 bool is_unix_socket()
const {
return type ==
's'; };
67 bool is_named_pipe()
const {
return type ==
'p'; };
68 bool is_hard_linked()
const {
return hard_link; };
69 bool is_removed_entry()
const {
return type ==
'x'; };
70 bool is_door_inode()
const {
return type ==
'o'; };
72 bool has_data_present_in_the_archive()
const {
return data_status == s_saved; };
73 bool has_EA()
const {
return ea_status != inode::ea_none && ea_status != inode::ea_removed; };
74 bool has_EA_saved_in_the_archive()
const {
return ea_status == inode::ea_full; };
76 std::string get_uid()
const {
return deci(uid).
human(); };
77 std::string get_gid()
const {
return deci(gid).
human(); };
79 std::string get_last_access()
const {
return last_access != 0 ?
tools_display_date(last_access) :
""; };
80 std::string get_last_modif()
const {
return last_modif != 0 ?
tools_display_date(last_modif) :
""; };
81 std::string get_last_change()
const {
return last_change != 0 ?
tools_display_date(last_change) :
""; };
82 std::string get_file_size()
const {
return deci(file_size).
human(); };
84 bool is_sparse()
const {
return sparse_file; };
85 std::string get_compression_algo()
const {
return compression2string(compression_algo); };
86 bool is_dirty()
const {
return dirty; };
87 std::string get_link_target()
const {
return target; };
88 std::string get_major()
const {
return tools_int2str(major); };
89 std::string get_minor()
const {
return tools_int2str(minor); };
93 void set_name(
const std::string & val) { my_name = val; };
94 void set_type(
unsigned char val) { type = val; };
95 void set_hard_link(
bool val) { hard_link = val; };
96 void set_uid(
const infinint & val) { uid = val; };
97 void set_gid(
const infinint & val) { gid = val; };
98 void set_perm(U_16 val) { perm = val; };
99 void set_last_access(
const infinint & val) { last_access = val; };
100 void set_last_modif(
const infinint & val) { last_modif = val; };
101 void set_saved_status(saved_status val) { data_status = val; };
102 void set_ea_status(inode::ea_status val) { ea_status = val; };
103 void set_last_change(
const infinint & val) { last_change = val; };
104 void set_file_size(
const infinint & val) { file_size = val; };
105 void set_storage_size(
const infinint & val) { storage_size = val; };
106 void set_is_sparse_file(
bool val) { sparse_file = val; };
107 void set_compression_algo(
compression val) { compression_algo = val; };
108 void set_dirtiness(
bool val) { dirty = val; };
109 void set_link_target(
const std::string & val) { target = val; };
110 void set_major(
int val) { major = val; };
111 void set_minor(
int val) { minor = val; };
122 saved_status data_status;
123 inode::ea_status ea_status;
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