Disk ARchive 2.7.16
Full featured and portable backup and archiving tool
cat_ignored_dir.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2024 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef CAT_IGNORED_DIR_HPP
27#define CAT_IGNORED_DIR_HPP
28
29#include "../my_config.h"
30
31extern "C"
32{
33} // end extern "C"
34
35#include "cat_inode.hpp"
36#include "cat_directory.hpp"
37
38namespace libdar
39{
40
43
45
47 {
48 public:
49 cat_ignored_dir(const cat_directory &target) : cat_inode(target) {};
50 cat_ignored_dir(const std::shared_ptr<user_interaction> & dialog,
52 const archive_version & reading_ver,
53 bool small) : cat_inode(dialog, pdesc, reading_ver, saved_status::not_saved, small) { throw SRC_BUG; };
54 cat_ignored_dir(const cat_ignored_dir & ref) = default;
55 cat_ignored_dir(cat_ignored_dir && ref) noexcept = default;
56 cat_ignored_dir & operator = (const cat_ignored_dir & ref) = default;
57 cat_ignored_dir & operator = (cat_ignored_dir && ref) = default;
58 ~cat_ignored_dir() = default;
59
60 bool operator == (const cat_entree & ref) const override;
61
62 virtual unsigned char signature() const override { return 'j'; };
63 virtual std::string get_description() const override { return "ignored directory"; };
64 cat_entree *clone() const override { return new (std::nothrow) cat_ignored_dir(*this); };
65
66 protected:
67 virtual void inherited_dump(const pile_descriptor & pdesc, bool small) const override; // behaves like an empty cat_directory
68
69 };
70
72
73} // end of namespace
74
75#endif
class used to organize objects in tree in catalogue as like directories in a filesystem
base object for all inode types, managed EA and FSA, dates, permissions, ownership,...
class archive_version manages the version of the archive format
the cat_directory inode class
the root class from all other inherite for any entry in the catalogue
Definition: cat_entree.hpp:60
the ignored cat_directory class, to be promoted later as empty cat_directory if needed
virtual std::string get_description() const override
inherited class designation
bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
cat_entree * clone() const override
a way to copy the exact type of an object even if pointed to by a parent class pointer
virtual unsigned char signature() const override
inherited class signature
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
true if object has been created by sequential reading of an archive
the root class for all cat_inode
Definition: cat_inode.hpp:53
cat_inode(const infinint &xuid, const infinint &xgid, U_16 xperm, const datetime &last_access, const datetime &last_modif, const datetime &last_change, const std::string &xname, const infinint &device)
flag used to only consider certain fields when comparing/restoring inodes
@ not_saved
inode is not saved in the archive
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47