 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef CACHE_GLOBAL_HPP
27 #define CACHE_GLOBAL_HPP
29 #include "../my_config.h"
44 static const U_I default_cache_size = 102400;
54 cache_global(
const std::shared_ptr<user_interaction> & dialog,
fichier_global *x_ptr,
bool shift_mode, U_I size = default_cache_size);
89 void change_to_read_write() { buffer->change_to_read_write(); };
virtual bool skip_to_eof() override
skip to the end of file
virtual void write(const char *a, U_I size) override
write data to the generic_file inherited from proto_generic_file
virtual U_I fichier_global_inherited_write(const char *a, U_I size) override
replaces generic_file::inherited_write() method, to allow the return of partial writings
the cache class implements a fixed length read/write caching mechanism
cache_global(const std::shared_ptr< user_interaction > &dialog, fichier_global *x_ptr, bool shift_mode, U_I size=default_cache_size)
constructor
virtual void change_permission(U_I perm) override
change the permission of the file
virtual bool skip(const infinint &pos) override
skip at the absolute position
virtual void change_permission(U_I perm)=0
change the permission of the file
the arbitrary large positive integer class
void flush_read()
be ready to read at current position, reseting all pending data for reading, cached and in compressio...
void sync_write()
write any pending data
virtual void change_ownership(const std::string &user, const std::string &group)=0
set the ownership of the file
the cache_global cache is an adaptation of the cache class to the fichier_global interface
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
virtual void change_ownership(const std::string &user, const std::string &group) override
set the ownership of the file
class fichier_global definition. This class is a pure virtual class class fichier_global is an abstra...
virtual void fadvise(advise adv) const override
set posix_fadvise for the whole file
cache_global & operator=(const cache_global &ref)=delete
assignment operator
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
void read_ahead(const infinint &amount)
void terminate()
destructor-like call, except that it is allowed to throw exceptions
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...
~cache_global()
destructor
virtual U_I read(char *a, U_I size) override
read data from the generic_file inherited from proto_generic_file
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
virtual bool skip(const infinint &pos) override
skip at the absolute position
virtual bool fichier_global_inherited_read(char *a, U_I size, U_I &read, std::string &message) override
replaces generic_file::inherited_read() method, to allow the return of partial reading
virtual void fadvise(advise adv) const =0
set posix_fadvise for the whole file
abstraction of filesystem files for entrepot
virtual void inherited_sync_write() override
write down any pending data
virtual bool skip_to_eof() override
skip to the end of file
virtual bool skip_relative(S_I x) override
skip relatively to the current position
virtual infinint get_position() const override
get the current read/write position
virtual infinint get_position() const override
get the current read/write position
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
virtual bool skip_relative(S_I x) override
skip relatively to the current position
virtual infinint get_size() const override
return the size of the file
virtual infinint get_size() const =0
return the size of the file
libdar namespace encapsulate all libdar symbols