 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
29 #include "../my_config.h"
102 U_I available_in_cache(skippability direction)
const;
cache(generic_file &hidden, bool shift_mode, U_I size=102400)
virtual bool skip_to_eof() override
skip to the end of file
U_I half
precalculated half = size / 2
the cache class implements a fixed length read/write caching mechanism
virtual bool skip(const infinint &pos) override
skip at the absolute position
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
virtual void inherited_write(const char *a, U_I size) override
implementation of the write() operation
virtual U_I inherited_read(char *a, U_I size) override
implementation of read() operation
switch module to limitint (32 ou 64 bits integers) or infinint
the arbitrary large positive integer class
U_I next
next to read or next place to write to
U_I last
first byte of invalid data in the cache. we have: next <= last < size
gf_mode get_mode() const
retreive the openning mode for this object
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...
void alloc_buffer(size_t x_size)
allocate x_size byte in buffer field and set size accordingly
class generic_file is defined here as well as class fichier
char * buffer
data in transit
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
virtual void inherited_sync_write() override
write down any pending data
bool shifted_mode
whether to half flush and shift or totally flush data
U_I first_to_write
position of the first byte that need to be written. if greater than last, no byte need writing
generic_file * ref
underlying file, (not owned by "this', not to be delete by "this")
this is the interface class from which all other data transfer classes inherit
infinint eof_offset
size of the underlying file (read-only mode), set to zero if unknown
void release_buffer()
release memory set buffer to nullptr and size to zero
infinint buffer_offset
position of the first byte in buffer
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
virtual infinint get_position() const override
get the current read/write position
virtual bool skip_relative(S_I x) override
skip relatively to the current position
libdar namespace encapsulate all libdar symbols