42 #include "../my_config.h"
79 void set_root(
const path & p_root) {
if(p_root.
is_relative())
throw Erange(
"entrepot::set_root", std::string(gettext(
"root's entrepot must be an absolute path: ")) + p_root.
display()); root = p_root; };
83 void set_group_ownership(
const std::string & x_group) { group = x_group; };
85 const path & get_location()
const {
return where; };
86 const path & get_root()
const {
return root; };
87 path get_full_path()
const;
88 virtual std::string get_url()
const = 0;
89 const std::string & get_user_ownership()
const {
return user; };
90 const std::string & get_group_ownership()
const {
return group; };
104 fichier_global *
open(user_interaction & dialog,
105 const std::string & filename,
107 bool force_permission,
115 virtual bool read_dir_next(std::string & filename) = 0;
117 void unlink(
const std::string & filename)
const { inherited_unlink(filename); };
120 virtual entrepot *clone()
const = 0;
123 virtual fichier_global *inherited_open(user_interaction & dialog,
124 const std::string & filename,
126 bool force_permission,
129 bool erase)
const = 0;
131 virtual void inherited_unlink(
const std::string & filename)
const = 0;
133 virtual void read_dir_flush() = 0;
virtual void read_dir_reset()=0
routines to read existing files in the current directory (see set_location() / set_root() methods) ...
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
gf_mode
generic_file openning modes
void set_root(const path &p_root)
defines the root to use if set_location is given a relative path
bool is_relative() const
whether the path is relative or absolute (= start with a /)
defines the interaction between libdar and the user.Three classes are defined
void set_location(const path &chemin)
defines the directory where to proceed to future open() – this is a "chdir" semantics ...
here is the definition of the path classthe path class handle path and provide several operation on t...
definition of the etage structure is done here
class fichier_global definition. This class is a pure virtual class class fichier_global is an abstra...
fichier_global * open(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
bool operator==(const entrepot &ref) const
says whether two entrepot objects points to the same location
switch module to limitint (32 ou 64 bits integers) or infinint
class hash_fichier definition.This is an inherited class from class fichier Objects of that class are...
exception used to signal range error
this is the base class of object that can be allocated on a memory pool
std::string display() const
convert back a path to a string
void set_user_ownership(const std::string &x_user)
set default ownership for files to be created thanks to the open() methods
virtual ~entrepot()
destructor
libdar namespace encapsulate all libdar symbols
the class path is here to manipulate paths in the Unix notation: using'/'