Loading...
Searching...
No Matches
cat_lien.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 CAT_LIEN_HPP
#define CAT_LIEN_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include "cat_inode.hpp"
namespace libdar
{
class cat_lien : public cat_inode
{
public :
cat_lien(const infinint & uid, const infinint & gid, U_16 perm,
const datetime & last_access,
const datetime & last_modif,
const datetime & last_change,
const std::string & name,
const std::string & target,
const infinint & fs_device);
cat_lien(const std::shared_ptr<user_interaction> & dialog,
const smart_pointer<pile_descriptor> & pdesc,
const archive_version & reading_ver,
saved_status saved,
bool small);
cat_lien(const cat_lien & ref) = default;
cat_lien(cat_lien && ref) noexcept = default;
cat_lien & operator = (const cat_lien & ref) = default;
cat_lien & operator = (cat_lien && ref) = default;
~cat_lien() = default;
virtual bool operator == (const cat_entree & ref) const override;
const std::string & get_target() const;
void set_target(std::string x);
// using the method is_more_recent_than() from cat_inode
// using method has_changed_since() from cat_inode class
virtual unsigned char signature() const override { return 'l'; };
virtual std::string get_description() const override { return "symlink"; };
virtual cat_entree *clone() const override { return new (std::nothrow) cat_lien(*this); };
protected :
virtual void sub_compare(const cat_inode & other, bool isolated_mode) const override;
virtual void inherited_dump(const pile_descriptor & pdesc, bool small) const override;
private :
std::string points_to;
};
} // end of namespace
#endif
cat_inode.hpp
base object for all inode types, managed EA and FSA, dates, permissions, ownership,...
libdar::archive_version
class archive_version manages the version of the archive format
Definition archive_version.hpp:47
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition cat_entree.hpp:60
libdar::cat_inode
the root class for all cat_inode
Definition cat_inode.hpp:53
libdar::cat_inode::perm
U_16 perm
inode's permission
Definition cat_inode.hpp:179
libdar::cat_inode::uid
infinint uid
inode owner's user ID
Definition cat_inode.hpp:177
libdar::cat_inode::gid
infinint gid
inode owner's group ID
Definition cat_inode.hpp:178
libdar::cat_lien
the symbolic link inode class
Definition cat_lien.hpp:46
libdar::cat_lien::signature
virtual unsigned char signature() const override
inherited from cat_entree
Definition cat_lien.hpp:76
libdar::cat_lien::clone
virtual cat_entree * clone() const override
inherited from cat_entree
Definition cat_lien.hpp:82
libdar::cat_lien::operator==
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
libdar::cat_lien::inherited_dump
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
true if object has been created by sequential reading of an archive
libdar::cat_lien::get_description
virtual std::string get_description() const override
inherited from cat_entree
Definition cat_lien.hpp:79
libdar::datetime
stores time information
Definition datetime.hpp:59
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::smart_pointer
smart pointer class to be used to automagically manage multiple time pointed to address
Definition smart_pointer.hpp:79
libdar::saved_status
saved_status
data saved status for an entry
Definition cat_status.hpp:45
libdar::saved_status::saved
@ saved
inode is saved in the archive
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