 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
30 #ifndef HASH_FICHIER_HPP
31 #define HASH_FICHIER_HPP
33 #include "../my_config.h"
38 #ifndef GCRYPT_NO_DEPRECATED
39 #define GCRYPT_NO_DEPRECATED
72 hash_fichier(
const std::shared_ptr<user_interaction> & dialog,
74 const std::string & under_filename,
100 virtual bool skippable(skippability direction,
const infinint & amount)
override {
return false; };
101 virtual bool skip(
const infinint & pos)
override {
if(ref ==
nullptr || pos != ref->
get_position())
throw SRC_BUG;
else return true; };
103 virtual bool skip_relative(S_I x)
override {
if(x != 0)
throw SRC_BUG;
else return true; };
125 gcry_md_hd_t hash_handle;
127 std::string ref_filename;
virtual void change_ownership(const std::string &user, const std::string &group) override
set the ownership of the file
hash_algo
hashing algorithm available
virtual void inherited_sync_write() override
write down any pending data
~hash_fichier()
destructor
virtual void change_permission(U_I perm)=0
change the permission of the file
virtual infinint get_size() const override
return the size of the file
are defined here basic integer types that tend to be portable
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
hash_fichier(const std::shared_ptr< user_interaction > &dialog, fichier_global *under, const std::string &under_filename, fichier_global *hash_file, hash_algo algo)
the arbitrary large positive integer class
void set_only_hash()
for debugging purposes only
manages the generation of a hash
virtual void fadvise(advise adv) const override
set posix_fadvise for the whole file
bool only_hash
if set, avoids copying data to file, only compute hash (debugging purpose)
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
virtual void change_ownership(const std::string &user, const std::string &group)=0
set the ownership of the file
gf_mode get_mode() const
retreive the openning mode for this object
class fichier_global definition. This class is a pure virtual class class fichier_global is an abstra...
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
hash_fichier & operator=(const hash_fichier &ref)=delete
assignment operator
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...
virtual bool skip_to_eof() override
skip to the end of file
void read_ahead(const infinint &amount)
set of datastructures used to interact with a catalogue object
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
virtual U_I read(char *a, U_I size) override
read data from the generic_file inherited from proto_generic_file
virtual infinint get_position() const override
get the current read/write position
virtual void change_permission(U_I perm) override
change the permission of the file
abstraction of filesystem files for entrepot
virtual bool skip_relative(S_I x) override
skip relatively to the current position
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
libdar namespace encapsulate all libdar symbols