27#ifndef ENTREPOT_LOCAL_HPP
28#define ENTREPOT_LOCAL_HPP
47 class entrepot_local :
public entrepot
50 entrepot_local(
const std::string & user,
const std::string & group,
bool x_furtive_mode);
51 entrepot_local(
const entrepot_local & ref):
entrepot(ref) { copy_from(ref); };
52 entrepot_local(entrepot_local && ref)
noexcept:
entrepot(std::move(ref)) { nullifyptr(); move_from(std::move(ref)); };
53 entrepot_local & operator = (
const entrepot_local & ref);
54 entrepot_local & operator = (entrepot_local && ref)
noexcept {
entrepot::operator = (std::move(ref)); move_from(std::move(ref));
return *
this; };
55 ~entrepot_local() { detruit(); };
60 virtual bool read_dir_next(std::string & filename)
const override;
65 virtual fichier_global *inherited_open(
const std::shared_ptr<user_interaction> & dialog,
66 const std::string & filename,
68 bool force_permission,
71 bool erase)
const override;
73 virtual void inherited_unlink(
const std::string & filename)
const override;
74 virtual void read_dir_flush()
override { detruit(); };
80 void nullifyptr() noexcept { contents =
nullptr; };
81 void copy_from(
const entrepot_local & ref) { furtive_mode = ref.furtive_mode; contents =
nullptr; };
82 void move_from(entrepot_local && ref)
noexcept { std::swap(contents, ref.contents), std::swap(furtive_mode, ref.furtive_mode); };
83 void detruit() {
if(contents !=
nullptr) {
delete contents; contents =
nullptr; } };
virtual void read_dir_reset() const override
routines to read existing files in the current directory (see set_location() / set_root() methods)
virtual std::string get_url() const override
full path of current directory + anything necessary to provide URL formated information
virtual entrepot * clone() const override
generate a clone of "this"
virtual path get_full_path() const
returns the full path of location
entrepot & operator=(const entrepot &ref)=default
assignment operator
abstraction of filesystem files for entrepot
std::string display() const
convert back a path to a string
gf_mode
generic_file openning modes
include macro defined by the configure script and some specific additional ones
libdar namespace encapsulate all libdar symbols
defines the entrepot interface.
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...
defines the interaction interface between libdar and users.