29 #include "../my_config.h" 73 const std::string & base_name,
74 const std::string & extension,
79 const std::string & execute =
"");
106 const std::string & base_name,
107 const std::string & extension,
110 bool x_warn_overwrite,
111 bool x_allow_overwrite,
114 const label & internal_name,
115 const label & data_name,
116 bool force_permission,
120 bool format_07_compatible,
121 const std::string & execute =
"");
138 const slice_layout & get_slicing()
const {
return slicing; };
139 bool get_total_file_number(
infinint &num)
const { num = of_last_file_num;
return of_last_file_known; };
140 bool get_last_file_size(
infinint &num)
const { num = of_last_file_size;
return of_last_file_known; };
143 void disable_natural_destruction() { natural_destruction =
false; };
146 void enable_natural_destruction() { natural_destruction =
true; };
149 bool is_an_old_start_end_archive()
const {
return slicing.older_sar_than_v8; };
152 const label & get_internal_name_used()
const {
return of_internal_name; };
155 const label & get_data_name()
const {
return of_data_name; };
157 const entrepot *get_entrepot()
const {
return entr; };
178 slice_layout slicing;
182 bool natural_destruction;
188 bool of_last_file_known;
191 label of_internal_name;
199 bool opt_warn_overwrite;
200 bool opt_allow_overwrite;
206 bool skip_forward(U_I x);
207 bool skip_backward(U_I x);
208 void close_file(
bool terminal);
209 void open_readonly(
const std::string & fic,
const infinint &num);
210 void open_writeonly(
const std::string & fic,
const infinint &num);
211 void open_file_init();
214 void open_last_file();
215 bool is_current_eof_a_normal_end_of_slice()
const;
216 infinint bytes_still_to_read_in_slice()
const;
220 void hook_execute(
const infinint &num);
void inherited_flush_read()
defines the entrepot interface. Entrepot interface defines a generic way to interact with files (slic...
sar(const sar &ref)
the destructor
are defined here basic integer types that tend to be portable
bool skip_to_eof()
skip to the end of file
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
void inherited_sync_write()
write down any pending data
This is a pure virtual class that is used by libdar when interaction with the user is required...
Sar class stands for Segmentation And Reassembly class.
U_I inherited_read(char *a, U_I size)
implementation of read() operation
gf_mode
generic_file openning modes
object describing the slicing of an archive
infinint get_position() const
get the current read/write position
void inherited_read_ahead(const infinint &amount)
bool skippable(skippability direction, const infinint &amount)
here is the definition of the path classthe path class handle path and provide several operation on t...
exception used when a requested feature is not (yet) implemented
abstraction of filesystem files for entrepot
void inherited_terminate()
destructor-like call, except that it is allowed to throw exceptions
switch module to limitint (32 ou 64 bits integers) or infinint
this is the interface class from which all other data transfer classes inherit
class mem_ui to keep a copy of a user_interaction object
bool skip(const infinint &pos)
const infinint & get_non_first_slice_header_size() const
get the non first slice header
void inherited_write(const char *a, U_I size)
implementation of the write() operation
const infinint & get_first_slice_header_size() const
get the first slice header
the arbitrary large positive integer class
bool skip_relative(S_I x)
skip relatively to the current position
sar(const user_interaction &dialog, const std::string &base_name, const std::string &extension, const entrepot &where, bool by_the_end, const infinint &x_min_digits, bool lax=false, const std::string &execute="")
this constructor reads data from a set of slices
libdar namespace encapsulate all libdar symbols