Loading...
Searching...
No Matches
filesystem_backup.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2026 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 FILESYSTEM_BACKUP_HPP
#define FILESYSTEM_BACKUP_HPP
#include "../my_config.h"
extern "C"
{
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
} // end extern "C"
#include <deque>
#include "infinint.hpp"
#include "etage.hpp"
#include "cat_entree.hpp"
#include "filesystem_hard_link_read.hpp"
#include <set>
namespace libdar
{
class filesystem_backup : public filesystem_hard_link_read
{
public:
filesystem_backup(const std::shared_ptr<user_interaction> & dialog,
const path &root,
bool x_info_details,
const mask & x_ea_mask,
bool check_no_dump_flag,
bool alter_atime,
bool furtive_read_mode,
bool x_cache_directory_tagging,
infinint & root_fs_device,
bool x_ignore_unknown,
const fsa_scope & scope);
filesystem_backup(const filesystem_backup & ref) = delete;
filesystem_backup(filesystem_backup && ref) = delete;
filesystem_backup & operator = (const filesystem_backup & ref) = delete;
filesystem_backup & operator = (filesystem_backup && ref) = delete;
~filesystem_backup() { detruire(); };
void reset_read(infinint & root_fs_device);
bool read(cat_entree * & ref, infinint & errors, infinint & skipped_dump);
void skip_read_to_parent_dir();
// continue reading in parent directory and
// ignore all entry not yet read of current directory
private:
path *fs_root;
bool info_details;
mask *ea_mask;
bool no_dump_check;
bool alter_atime;
bool furtive_read_mode;
bool cache_directory_tagging;
path *current_dir;
std::deque<etage> pile;
bool ignore_unknown;
void detruire();
};
} // end of namespace
#endif
cat_entree.hpp
base class for all object contained in a catalogue
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition cat_entree.hpp:60
libdar::filesystem_backup::cache_directory_tagging
bool cache_directory_tagging
whether to consider cache directory taggin standard
Definition filesystem_backup.hpp:91
libdar::filesystem_backup::info_details
bool info_details
detailed information returned to the user
Definition filesystem_backup.hpp:86
libdar::filesystem_backup::furtive_read_mode
bool furtive_read_mode
whether to use furtive read mode (if true, alter_atime is ignored)
Definition filesystem_backup.hpp:90
libdar::filesystem_backup::ignore_unknown
bool ignore_unknown
whether to ignore unknown inode types
Definition filesystem_backup.hpp:94
libdar::filesystem_backup::alter_atime
bool alter_atime
whether to set back atime or not
Definition filesystem_backup.hpp:89
libdar::filesystem_backup::current_dir
path * current_dir
needed to translate from an hard linked inode to an already allocated object
Definition filesystem_backup.hpp:92
libdar::filesystem_backup::pile
std::deque< etage > pile
to store the contents of a directory
Definition filesystem_backup.hpp:93
libdar::filesystem_backup::fs_root
path * fs_root
filesystem's root to consider
Definition filesystem_backup.hpp:85
libdar::filesystem_backup::ea_mask
mask * ea_mask
mask defining the EA to consider
Definition filesystem_backup.hpp:87
libdar::filesystem_backup::no_dump_check
bool no_dump_check
whether to check against the nodump flag presence
Definition filesystem_backup.hpp:88
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::mask
the generic class, parent of all masks
Definition mask.hpp:62
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
etage.hpp
definition of the etage structure is done here
filesystem_hard_link_read.hpp
filesystem_hard_link_read classes manages hardlinked inode read from filesystem
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition fsa_family.hpp:70
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47