36 #include "../my_config.h"
97 void set_group_ownership(
const std::string & x_group) { group = x_group; };
99 virtual const path & get_location()
const {
return where; };
100 virtual const path & get_root()
const {
return root; };
102 const std::string & get_user_ownership()
const {
return user; };
103 const std::string & get_group_ownership()
const {
return group; };
119 const std::string & filename,
121 bool force_permission,
126 bool provide_a_plain_file =
true)
const;
130 virtual bool read_dir_next(std::string & filename)
const = 0;
132 void unlink(
const std::string & filename)
const { inherited_unlink(filename); };
141 virtual fichier_global *inherited_open(
const std::shared_ptr<user_interaction> & dialog,
142 const std::string & filename,
144 bool force_permission,
147 bool erase)
const = 0;
149 virtual void inherited_unlink(
const std::string & filename)
const = 0;
151 virtual void read_dir_flush() = 0;
set of datastructures used to interact with a catalogue object
virtual path get_full_path() const
returns the full path of location
virtual void read_dir_reset() const =0
routines to read existing files in the current directory (see set_location() / set_root() methods)
entrepot(entrepot &&ref) noexcept=default
move constructor
entrepot(const entrepot &ref)=default
copy constructor
virtual void set_location(const path &chemin)
defines the directory where to proceed to future open() – this is a "chdir" semantics
virtual entrepot * clone() const =0
generate a clone of "this"
bool operator==(const entrepot &ref) const
says whether two entrepot objects points to the same location
void set_user_ownership(const std::string &x_user)
set default ownership for files to be created thanks to the open() methods
virtual ~entrepot()=default
destructor
fichier_global * open(const std::shared_ptr< user_interaction > &dialog, const std::string &filename, gf_mode mode, bool force_permission, U_I permission, bool fail_if_exists, bool erase, hash_algo algo, bool provide_a_plain_file=true) const
defines the way to open a file and return a "class fichier_global" object as last argument upon succe...
virtual std::string get_url() const =0
full path of current directory + anything necessary to provide URL formated information
virtual void set_root(const path &p_root)
defines the root to use if set_location is given a relative path
entrepot & operator=(const entrepot &ref)=default
assignment operator
abstraction of filesystem files for entrepot
the class path is here to manipulate paths in the Unix notation: using'/'
generic modes to open file
hash_algo
hashing algorithm available
gf_mode
generic_file openning modes
libdar namespace encapsulate all libdar symbols
here is the definition of the path class
defines the interaction interface between libdar and users.