29#ifndef FICHIER_GLOBAL_HPP
30#define FICHIER_GLOBAL_HPP
33#include "//include/dar/libdar_my_config.h"
37#if LIBDAR_HAS_UNISTD_H
42#include "//include/dar/integers.hpp"
43#include "//include/dar/generic_file.hpp"
44#include "//include/dar/thread_cancellation.hpp"
45#include "//include/dar/user_interaction.hpp"
46#include "//include/dar/mem_ui.hpp"
97 virtual void change_ownership(
const std::string & user,
const std::string & group) = 0;
abstraction of filesystem files for entrepot
virtual U_I inherited_read(char *a, U_I size) override
implementation of read() operation
@ advise_willneed
application expect to read the data again in near future
@ advise_sequential
application expect to read the data sequentially
@ advise_noreuse
application does not expect to read the data more than once
@ advise_normal
no advise given by the application
@ advise_dontneed
application will not read the data in near future
@ advise_random
application expect to read the data in random order
bool disk_full
whether user refused to continue due to disk being full
virtual infinint get_size() const =0
return the size of the file
fichier_global(const fichier_global &ref)=default
copy constructor
virtual void change_permission(U_I perm)=0
change the permission of the file
virtual void fadvise(advise adv) const =0
set posix_fadvise for the whole file
fichier_global & operator=(const fichier_global &ref)=default
assignment operator
fichier_global(fichier_global &&ref) noexcept=default
move constructor
virtual U_I fichier_global_inherited_write(const char *a, U_I size)=0
replaces generic_file::inherited_write() method, to allow the return of partial writings
virtual void change_ownership(const std::string &user, const std::string &group)=0
set the ownership of the file
virtual void inherited_write(const char *a, U_I size) override
implementation of the write() operation
virtual bool fichier_global_inherited_read(char *a, U_I size, U_I &read, std::string &message)=0
replaces generic_file::inherited_read() method, to allow the return of partial reading
fichier_global(const std::shared_ptr< user_interaction > &dialog, gf_mode mode)
constructor
this is the interface class from which all other data transfer classes inherit
virtual U_I read(char *a, U_I size) override
read data from the generic_file inherited from proto_generic_file
the arbitrary large positive integer class
class mem_ui to keep a copy of a user_interaction object
class to be used as parent to provide checkpoints to inherited classes
gf_mode
generic_file openning modes
libdar namespace encapsulate all libdar symbols