37 #include "../my_config.h" 94 virtual std::string
get_url()
const = 0;
98 void set_group_ownership(
const std::string & x_group) { group = x_group; };
100 virtual const path & get_location()
const {
return where; };
101 virtual const path & get_root()
const {
return root; };
103 const std::string & get_user_ownership()
const {
return user; };
104 const std::string & get_group_ownership()
const {
return group; };
119 const std::string & filename,
121 bool force_permission,
129 virtual bool read_dir_next(std::string & filename)
const = 0;
131 void unlink(
const std::string & filename)
const { inherited_unlink(filename); };
140 virtual fichier_global *inherited_open(
const std::shared_ptr<user_interaction> & dialog,
141 const std::string & filename,
143 bool force_permission,
146 bool erase)
const = 0;
148 virtual void inherited_unlink(
const std::string & filename)
const = 0;
150 virtual void read_dir_flush() = 0;
generic modes to open file
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) 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
virtual ~entrepot()=default
destructor
gf_mode
generic_file openning modes
bool operator==(const entrepot &ref) const
says whether two entrepot objects points to the same location
defines the interaction interface between libdar and users.
here is the definition of the path classthe path class handle path and provide several operation on t...
abstraction of filesystem files for entrepot
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) ...
virtual void set_location(const path &chemin)
defines the directory where to proceed to future open() – this is a "chdir" semantics ...
hash_algo
hashing algorithm available
entrepot & operator=(const entrepot &ref)=default
assignment operator
void set_user_ownership(const std::string &x_user)
set default ownership for files to be created thanks to the open() methods
libdar namespace encapsulate all libdar symbols
set of datastructures used to interact with a catalogue object
virtual entrepot * clone() const =0
generate a clone of "this"
the class path is here to manipulate paths in the Unix notation: using'/'