| Disk ARchive 2.8.3 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
dar64-2.8.3-win64/include/dar/filesystem_ids.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2026 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 FILESYSTEM_IDS_HPP
27#define FILESYSTEM_IDS_HPP
28
29#include "//include/dar/libdar_my_config.h"
30
31 extern "C"
32{
33} // end extern "C"
34
35#include <set>
36#include "//include/dar/infinint.hpp"
37#include "//include/dar/path.hpp"
38
39 namespace libdar
40{
43
44 class filesystem_ids
45 {
46 public:
47
49
51 filesystem_ids(const path & root);
52
54
61 filesystem_ids(bool same_fs, const path & root_fs);
62
63 filesystem_ids(const filesystem_ids & ref) = default;
64 filesystem_ids(filesystem_ids && ref) noexcept = default;
65 filesystem_ids & operator = (const filesystem_ids & ref) = default;
66 filesystem_ids & operator = (filesystem_ids && ref) noexcept = default;
67 ~filesystem_ids() = default;
68
70
74 void change_root_fs(const path & root);
75
77
81 void include_fs_at(const path & chem);
82
84
93 void exclude_fs_at(const path & chem);
94
97 bool is_covered(const infinint & fs_id) const;
98
100 bool is_covered(const path & chem) const;
101
103 void clear() { included.clear(); excluded.clear(); };
104
105 private:
106 infinint root_fs;
107 std::set<infinint> included;
108 std::set<infinint> excluded;
109
110 static infinint path2fs_id(const std::string & path);
111 };
112
114
115} // end of namespace
116
117#endif
libdar
libdar namespace encapsulate all libdar symbols
Definition dar64-2.8.3-win64/include/dar/archive.hpp:47