 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef TRIVIAL_SAR_HPP
27 #define TRIVIAL_SAR_HPP
29 #include "../my_config.h"
57 trivial_sar(
const std::shared_ptr<user_interaction> & dialog,
59 const std::string & base_name,
60 const std::string & extension,
62 const label & internal_nale,
63 const label & data_name,
64 const std::string & execute,
67 bool force_permission,
71 bool format_07_compatible
76 trivial_sar(
const std::shared_ptr<user_interaction> & dialog,
77 const std::string & pipename,
81 trivial_sar(
const std::shared_ptr<user_interaction> & dialog,
87 trivial_sar(
const std::shared_ptr<user_interaction> & dialog,
89 const label & internal_name,
90 const label & data_name,
91 bool format_07_compatible,
92 const std::string & execute
hash_algo
hashing algorithm available
virtual bool skip_relative(S_I x) override
skip relatively to the current position
trivial_sar(const std::shared_ptr< user_interaction > &dialog, gf_mode open_mode, const std::string &base_name, const std::string &extension, const entrepot &where, const label &internal_nale, const label &data_name, const std::string &execute, bool allow_over, bool warn_over, bool force_permission, U_I permission, hash_algo x_hash, const infinint &min_digits, bool format_07_compatible)
constructor to build a new single sliced archive
virtual bool skip_to_eof()=0
skip to the end of file
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
manage label data structure used in archive slice headers
std::string ext
extension of the archive (used for string substitution in hook)
void init(const label &internal_name)
write the slice header and set the offset field (write mode), or (read-mode), reads the slice header ...
class contextual adds the information of phases in the generic_file
virtual bool skip(const infinint &pos) override
skip at the absolute position
std::string base
basename of the archive (used for string susbstitution in hook)
infinint end_of_slice
when end of slice/archive is met, there is an offset by 1 compared to the offset of reference....
are defined here basic integer types that tend to be portable
gf_mode
generic_file openning modes
switch module to limitint (32 ou 64 bits integers) or infinint
the arbitrary large positive integer class
const infinint & get_slice_header_size() const
size of the slice header
void flush_read()
be ready to read at current position, reseting all pending data for reading, cached and in compressio...
virtual U_I inherited_read(char *a, U_I size) override
implementation of read() operation
std::string hook_where
what value to use for p substitution in hook
void sync_write()
write any pending data
void enable_natural_destruction()
enable back execution of user command when destroying the current object
trivial_sar & operator=(const trivial_sar &ref)=delete
assignment operator (disabled)
virtual void inherited_write(const char *a, U_I size) override
implementation of the write() operation
infinint min_digits
minimum number of digits in slice name
bool is_terminated() const
std::string base_url
what value to use for u substitution in hook
virtual infinint get_position() const override
get the current read/write position
class mem_ui to keep a copy of a user_interaction object
defines the entrepot interface. Entrepot interface defines a generic way to interact with files (slic...
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
class generic_file is defined here as well as class fichier
std::string hook
command to execute after slice writing (not used in read-only mode)
virtual bool skippable(skippability direction, const infinint &amount)=0
whether the implementation is able to skip
std::string sar_make_filename(const std::string &base_name, const infinint &num, const infinint &min_digits, const std::string &ext)
return the name of a slice given the base_name, slice number and extension
infinint cur_pos
current position as returned by get_position()
virtual void inherited_read_ahead(const infinint &amount) override
tells the object that several calls to read() will follow to probably obtain at least the given amoun...
label of_data_name
archive's data name
void disable_natural_destruction()
disable execution of user command when destroying the current object
void read_ahead(const infinint &amount)
this is the interface class from which all other data transfer classes inherit
the contextual class adds the information of phases in the generic_file
bool natural_destruction
whether user command is executed once the single sliced archive is completed (disable upon user inter...
virtual bool skip_to_eof() override
skip to the end of file
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
virtual bool is_an_old_start_end_archive() const override
returns whether the archive is a old archive (format < 8)
bool old_sar
true if the read sar has an old header (format <= "07") or the to be written is must keep a version 0...
virtual void inherited_sync_write() override
write down any pending data
virtual const label & get_data_name() const override
obtain the data_name of the archive (label associated with the archive's data)
infinint offset
offset to apply to get the first byte of data out of SAR headers
generic_file * reference
points to the underlying data, owned by "this"
class mem_ui definition. This class is to be used as parent class to handle user_interaction object m...
libdar namespace encapsulate all libdar symbols