Loading...
Searching...
No Matches
archive5.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2024 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef ARCHIVE5_HPP
#define ARCHIVE5_HPP
#include "../my_config.h"
#include "archive.hpp"
#include "user_interaction5.hpp"
#include "archive_options5.hpp"
namespace libdar5
{
// from archive_options.hpp
using libdar::path;
using libdar::statistics;
class archive: public libdar::archive
{
public:
archive(user_interaction & dialog,
const path & chem,
const std::string & basename,
const std::string & extension,
const archive_options_read & options):
libdar::archive(user_interaction5_clone_to_shared_ptr(dialog),
chem,
basename,
extension,
options)
{}
archive(user_interaction & dialog,
const path & fs_root,
const path & sauv_path,
const std::string & filename,
const std::string & extension,
const archive_options_create & options,
statistics * progressive_report):
libdar::archive(user_interaction5_clone_to_shared_ptr(dialog),
fs_root,
sauv_path,
filename,
extension,
options,
progressive_report)
{}
archive(user_interaction & dialog,
const path & sauv_path,
archive *ref_arch1,
const std::string & filename,
const std::string & extension,
const archive_options_merge & options,
statistics * progressive_report):
libdar::archive(user_interaction5_clone_to_shared_ptr(dialog),
sauv_path,
std::shared_ptr<archive>(ref_arch1),
filename,
extension,
options,
progressive_report)
{}
archive(user_interaction & dialog,
const path & chem_src,
const std::string & basename_src,
const std::string & extension_src,
const archive_options_read & options_read,
const path & chem_dst,
const std::string & basename_dst,
const std::string & extension_dst,
const archive_options_repair & options_repair):
libdar::archive(user_interaction5_clone_to_shared_ptr(dialog),
chem_src,
basename_src,
extension_src,
options_read,
chem_dst,
basename_dst,
extension_dst,
options_repair)
{}
statistics op_extract(user_interaction & dialog,
const path &fs_root,
const archive_options_extract & options,
statistics *progressive_report)
{
return libdar::archive::op_extract(fs_root,
options,
progressive_report);
}
void summary(user_interaction & dialog)
{
libdar::archive::summary();
}
void op_listing(user_interaction & dialog,
const archive_options_listing & options);
statistics op_diff(user_interaction & dialog,
const path & fs_root,
const archive_options_diff & options,
statistics * progressive_report)
{
return libdar::archive::op_diff(fs_root,
options,
progressive_report);
}
statistics op_test(user_interaction & dialog,
const archive_options_test & options,
statistics * progressive_report)
{
return libdar::archive::op_test(options,
progressive_report);
}
void op_isolate(user_interaction & dialog,
const path &sauv_path,
const std::string & filename,
const std::string & extension,
const archive_options_isolate & options)
{
libdar::archive::op_isolate(sauv_path,
filename,
extension,
options);
}
bool get_children_of(user_interaction & dialog,
const std::string & dir);
void init_catalogue(user_interaction & dialog) const
{
libdar::archive::init_catalogue();
}
void drop_all_filedescriptors(user_interaction & dialog)
{
libdar::archive::drop_all_filedescriptors();
}
private:
static void listing_callback(const std::string & the_path,
const libdar::list_entry & entry,
void *context);
};
} // end of namespace
#endif
archive.hpp
the archive class is defined in this module
archive_options5.hpp
API v5 compatible archive_options_* classes.
libdar5::archive
the archive class realizes the most general operations on archives
Definition archive5.hpp:55
libdar5::archive::get_children_of
bool get_children_of(user_interaction &dialog, const std::string &dir)
overloading get_children_of to use the user_interaction object as callback
libdar5::archive::op_listing
void op_listing(user_interaction &dialog, const archive_options_listing &options)
overwriting op_listing to use the user_interaction as callback
libdar5::user_interaction
This is a pure virtual class that is used by libdar when interaction with the user is required.
Definition user_interaction5.hpp:88
libdar::archive_options_extract
class holding optional parameters used to extract files from an existing archive
Definition archive_options.hpp:1294
libdar::archive_options_repair
class holding optional parameters used to create an archive
Definition archive_options.hpp:1720
libdar::archive_options_test
class holding optional parameters used to test the structure coherence of an existing archive
Definition archive_options.hpp:1647
libdar::archive
the archive class realizes the most general operations on archives
Definition archive.hpp:65
libdar::list_entry
Definition list_entry.hpp:60
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
libdar::statistics
class used by libdar::archive class to give a summary of treated file during and after an operation
Definition statistics.hpp:70
libdar5::user_interaction5_clone_to_shared_ptr
std::shared_ptr< user_interaction > user_interaction5_clone_to_shared_ptr(user_interaction &dialog)
convert a user_interaction to a shared_pointer on a clone of that user_interaction
libdar::archive::op_test
statistics op_test(const archive_options_test &options, statistics *progressive_report)
test the archive integrity
libdar::archive::op_diff
statistics op_diff(const path &fs_root, const archive_options_diff &options, statistics *progressive_report)
archive comparison with filesystem
libdar::archive::init_catalogue
void init_catalogue() const
libdar::archive::summary
void summary()
display a summary of the archive
libdar::archive::op_isolate
void op_isolate(const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_isolate &options)
this methodes isolates the catalogue of a the current archive into a separated archive
libdar::archive::drop_all_filedescriptors
void drop_all_filedescriptors()
closes all filedescriptors and associated even when in sequential read mode
libdar::archive::op_extract
statistics op_extract(const path &fs_root, const archive_options_extract &options, statistics *progressive_report)
extraction of data from an archive
libdar5
libdar5 namespace encapsulate all libdar symbols
Definition archive5.hpp:37
user_interaction5.hpp
API v5 backward compatible class user_interaction.