Loading...
Searching...
No Matches
filesystem_ids.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_IDS_HPP
#define FILESYSTEM_IDS_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include <set>
#include "infinint.hpp"
#include "path.hpp"
namespace libdar
{
class filesystem_ids
{
public:
filesystem_ids(const path & root);
filesystem_ids(bool same_fs, const path & root_fs);
filesystem_ids(const filesystem_ids & ref) = default;
filesystem_ids(filesystem_ids && ref) noexcept = default;
filesystem_ids & operator = (const filesystem_ids & ref) = default;
filesystem_ids & operator = (filesystem_ids && ref) noexcept = default;
~filesystem_ids() = default;
void change_root_fs(const path & root);
void include_fs_at(const path & chem);
void exclude_fs_at(const path & chem);
bool is_covered(const infinint & fs_id) const;
bool is_covered(const path & chem) const;
void clear() { included.clear(); excluded.clear(); };
private:
infinint root_fs;
std::set<infinint> included;
std::set<infinint> excluded;
static infinint path2fs_id(const std::string & path);
};
} // end of namespace
#endif
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
path.hpp
here is the definition of the path class