Disk ARchive: libdar::cat_inode Class Reference

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

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
libdar::cat_inode Class Reference
Private

the root class for all cat_inode More...

`#include <cat_inode.hpp>`

Inherits libdar::cat_nomme.

Inherited by libdar::cat_device, libdar::cat_directory, libdar::cat_file, libdar::cat_ignored_dir, libdar::cat_lien, libdar::cat_prise, and libdar::cat_tube.

## Public Member Functions
| 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
| cat_inode (const std::shared_ptr< user_interaction > &dialog, const smart_pointer< pile_descriptor > &pdesc, const archive_version &reading_ver, saved_status saved, bool small)
| cat_inode (const cat_inode &ref)
| cat_inode (cat_inode &&ref) noexcept
cat_inode & | operator= (const cat_inode &ref)
cat_inode & | operator= (cat_inode &&ref)
const infinint & | get_uid () const
const infinint & | get_gid () const
U_16 | get_perm () const
datetime | get_last_access () const
datetime | get_last_modif () const
void | set_last_access (const datetime &x_time)
void | set_last_modif (const datetime &x_time)
infinint | get_device () const
bool | same_as (const cat_inode &ref) const
bool | is_more_recent_than (const cat_inode &ref, const infinint &hourshift) const
virtual bool | has_changed_since (const cat_inode &ref, const infinint &hourshift, comparison_fields what_to_check) const
void | compare (const cat_inode &other, const mask &ea_mask, comparison_fields what_to_check, const infinint &hourshift, bool symlink_date, const fsa_scope &scope, bool isolated_mode, bool seq_read_mode) const
void | ea_set_saved_status (ea_saved_status status)
ea_saved_status | ea_get_saved_status () const
void | ea_attach (ea_attributs *ref)
const ea_attributs * | get_ea () const
| the returned value is the address of an existing file of the cat_inode object and shall not be deleted by the caller
void | ea_detach () const
infinint | ea_get_size () const
void | ea_set_offset (const infinint &pos)
bool | ea_get_offset (infinint &pos) const
void | ea_set_crc (const crc &val)
void | ea_get_crc (const crc *&ptr) const
| the argument is set to point to an allocated crc object owned by this "cat_inode" object, this reference stays valid while the "cat_inode" object exists and MUST NOT be deleted by the caller in any case
bool | ea_get_crc_size (infinint &val) const
| returns true if crc is know and puts its width in argument
datetime | get_last_change () const
void | set_last_change (const datetime &x_time)
bool | has_last_change () const
void | fsa_set_saved_status (fsa_saved_status status)
fsa_saved_status | fsa_get_saved_status () const
fsa_scope | fsa_get_families () const
| gives the set of FSA family recorded for that inode
void | fsa_attach (filesystem_specific_attribute_list *ref)
void | fsa_partial_attach (const fsa_scope &val)
const filesystem_specific_attribute_list * | get_fsa () const
void | fsa_detach () const
infinint | fsa_get_size () const
void | fsa_set_offset (const infinint &pos)
bool | fsa_get_offset (infinint &pos) const
void | fsa_set_crc (const crc &val)
void | fsa_get_crc (const crc *&ptr) const
bool | fsa_get_crc_size (infinint &val) const
Public Member Functions inherited from libdar::cat_nomme
| cat_nomme (const std::string &name, saved_status arg)
| cat_nomme (const smart_pointer< pile_descriptor > &pdesc, bool small, saved_status val)
| cat_nomme (const cat_nomme &ref)=default
| cat_nomme (cat_nomme &&ref) noexcept=default
cat_nomme & | operator= (const cat_nomme &ref)=default
cat_nomme & | operator= (cat_nomme &&ref)=default
virtual bool | operator== (const cat_entree &ref) const override
| returns true if the two object are the same
virtual bool | operator< (const cat_nomme &ref) const
const std::string & | get_name () const
void | change_name (const std::string &x)
bool | same_as (const cat_nomme &ref) const
Public Member Functions inherited from libdar::cat_entree
| cat_entree (saved_status val)
| setup an object when read from filesystem
| cat_entree (const smart_pointer< pile_descriptor > &pdesc, bool small, saved_status val)
| setup an object when read from an archive
| cat_entree (const cat_entree &ref)=default
| cat_entree (cat_entree &&ref) noexcept=default
cat_entree & | operator= (const cat_entree &ref)=default
cat_entree & | operator= (cat_entree &&ref)=default
virtual | ~cat_entree () noexcept(false)
| destructor
bool | operator!= (const cat_entree &ref) const
bool | same_as (const cat_entree &ref) const
| return true of the two objects would generate the same entry on filsystem
void | dump (const pile_descriptor &pdesc, bool small) const
| write down the object information to a stack
void | specific_dump (const pile_descriptor &pdesc, bool small) const
| this call gives an access to inherited_dump
virtual void | post_constructor (const pile_descriptor &pdesc)
| let inherited classes build object's data after CRC has been read from file in small read mode
virtual unsigned char | signature () const =0
| inherited class signature
virtual std::string | get_description () const =0
| inherited class designation
virtual cat_entree * | clone () const =0
| a way to copy the exact type of an object even if pointed to by a parent class pointer
virtual void | change_location (const smart_pointer< pile_descriptor > &pdesc)
saved_status | get_saved_status () const
| obtain the saved status of the object
void | set_saved_status (saved_status x)
| modify the saved_status of the object
void | set_list_entry (const slice_layout *sly, bool fetch_ea, list_entry &ent) const
| setup a list_entry object relative to the current cat_entree object

## Protected Member Functions
virtual void | sub_compare (const cat_inode &other, bool isolated_mode, bool seq_read_mode) const
bool | get_small_read () const
virtual void | inherited_dump (const pile_descriptor &pdesc, bool small) const override
| true if object has been created by sequential reading of an archive
Protected Member Functions inherited from libdar::cat_entree
pile * | get_pile () const
| stack used to read object from (nullptr is returned for object created from filesystem)
proto_compressor * | get_compressor_layer () const
| compressor generic_file relative methods
escape * | get_escape_layer () const
| escape generic_file relative methods
generic_file * | get_read_cat_layer (bool small) const
| return the adhoc layer in the stack to read from the catalogue objects (except the EA, FSA or Data part)

## Private Member Functions
void | nullifyptr () noexcept
void | destroy () noexcept
void | copy_from (const cat_inode &ref)
void | move_from (cat_inode &&ref) noexcept

## Private Attributes
infinint | uid
| inode owner's user ID
infinint | gid
| inode owner's group ID
U_16 | perm
| inode's permission
datetime | last_acc
| last access time (atime)
datetime | last_mod
| last modification time (mtime)
datetime | last_cha
| last inode meta data change (ctime)
ea_saved_status | ea_saved
| inode Extended Attribute status
fsa_saved_status | fsa_saved
| inode Filesystem Specific Attribute status
bool | small_read
| whether we the object has been built with sequential-reading
infinint * | ea_offset
| offset in archive where to find EA
ea_attributs * | ea
| Extended Attributes read or to be written down.
infinint * | ea_size
| storage size required by EA
crc * | ea_crc
| CRC computed on EA.
infinint * | fsa_families
| list of FSA families present for that inode (set to nullptr in fsa_none mode)
infinint * | fsa_offset
| offset in archive where to find FSA # always allocated (to be reviewed)
filesystem_specific_attribute_list * | fsal
| Filesystem Specific Attributes read or to be written down # only allocated if fsa_saved if set to FULL.
infinint * | fsa_size
| storage size required for FSA
crc * | fsa_crc
| CRC computed on FSA.
infinint * | fs_dev
| filesystem ID on which resides the inode (only used when read from filesystem)
archive_version | edit
| need to know EA and FSA format used in archive file

## Static Private Attributes
static const ea_attributs | empty_ea

## Additional Inherited Members
Static Public Member Functions inherited from libdar::cat_entree
static cat_entree * | read (const std::shared_ptr< user_interaction > &dialog, const smart_pointer< pile_descriptor > &f, const archive_version &reading_ver, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, bool lax, bool only_detruit, bool small)
| read and create an object of inherited class of class cat_entree

## Detailed Description

the root class for all cat_inode

Definition at line 52 of file cat_inode.hpp.

## Constructor & Destructor Documentation

## ◆ cat_inode()

libdar::cat_inode::cat_inode | ( | cat_inode && | ref | ) |
| inlinenoexcept

Definition at line 72 of file cat_inode.hpp.

## Member Function Documentation

## ◆ compare()

void libdar::cat_inode::compare | ( | const cat_inode & | other,
|  | const mask & | ea_mask,
|  | comparison_fields | what_to_check,
|  | const infinint & | hourshift,
|  | bool | symlink_date,
|  | const fsa_scope & | scope,
|  | bool | isolated_mode,
|  | bool | seq_read_mode ) const

Parameters

  other | the inode to compare with
  ea_mask | EA mask to take into account for comparison
  what_to_check | inode metadata to take into account for comparison
  hourshift | number of interger number of date to ignode and assume identical
  symlink_date | whether to compare symlink dates
  scope | FSA to take into account for comparison
  isolated_mode | do not try to compare pointed to data, EA of FSA (suitable for isolated catalogue)
  seq_read_mode | this is read in seq mode => do not try to fetch delta sig when both isolated and seq_read mode are used

References cat_inode(), and ea_saved.

## ◆ ea_get_saved_status()

ea_saved_status libdar::cat_inode::ea_get_saved_status | ( |  | ) | const
| inline

Definition at line 117 of file cat_inode.hpp.

## ◆ fsa_get_families()

fsa_scope libdar::cat_inode::fsa_get_families | ( |  | ) | const
| inline

gives the set of FSA family recorded for that inode

Definition at line 152 of file cat_inode.hpp.

References fsa_families, and libdar::infinint_to_fsa_scope().

## ◆ fsa_get_saved_status()

fsa_saved_status libdar::cat_inode::fsa_get_saved_status | ( |  | ) | const
| inline

Definition at line 150 of file cat_inode.hpp.

## ◆ get_device()

infinint libdar::cat_inode::get_device | ( |  | ) | const
| inline

Definition at line 84 of file cat_inode.hpp.

## ◆ get_gid()

const infinint & libdar::cat_inode::get_gid | ( |  | ) | const
| inline

Definition at line 78 of file cat_inode.hpp.

## ◆ get_last_access()

datetime libdar::cat_inode::get_last_access | ( |  | ) | const
| inline

Definition at line 80 of file cat_inode.hpp.

## ◆ get_last_change()

datetime libdar::cat_inode::get_last_change | ( |  | ) | const
| inline

Definition at line 135 of file cat_inode.hpp.

## ◆ get_last_modif()

datetime libdar::cat_inode::get_last_modif | ( |  | ) | const
| inline

Definition at line 81 of file cat_inode.hpp.

## ◆ get_perm()

U_16 libdar::cat_inode::get_perm | ( |  | ) | const
| inline

Definition at line 79 of file cat_inode.hpp.

## ◆ get_small_read()

bool libdar::cat_inode::get_small_read | ( |  | ) | const
| inlineprotected

Definition at line 174 of file cat_inode.hpp.

## ◆ get_uid()

const infinint & libdar::cat_inode::get_uid | ( |  | ) | const
| inline

Definition at line 77 of file cat_inode.hpp.

## ◆ has_last_change()

bool libdar::cat_inode::has_last_change | ( |  | ) | const
| inline

Definition at line 137 of file cat_inode.hpp.

## ◆ inherited_dump()

virtual void libdar::cat_inode::inherited_dump | ( | const pile_descriptor & | pdesc,
|  | bool | small ) const
| overrideprotectedvirtual

true if object has been created by sequential reading of an archive

Reimplemented from libdar::cat_nomme.

Reimplemented in libdar::cat_device, libdar::cat_directory, libdar::cat_file, libdar::cat_ignored_dir, and libdar::cat_lien.

## ◆ operator=()

cat_inode & libdar::cat_inode::operator= | ( | cat_inode && | ref | ) |
| inline

Definition at line 74 of file cat_inode.hpp.

## ◆ set_last_access()

void libdar::cat_inode::set_last_access | ( | const datetime & | x_time | ) |
| inline

Definition at line 82 of file cat_inode.hpp.

## ◆ set_last_change()

void libdar::cat_inode::set_last_change | ( | const datetime & | x_time | ) |
| inline

Definition at line 136 of file cat_inode.hpp.

## ◆ set_last_modif()

void libdar::cat_inode::set_last_modif | ( | const datetime & | x_time | ) |
| inline

Definition at line 83 of file cat_inode.hpp.

## ◆ sub_compare()

virtual void libdar::cat_inode::sub_compare | ( | const cat_inode & | other,
|  | bool | isolated_mode,
|  | bool | seq_read_mode ) const
| inlineprotectedvirtual

Definition at line 171 of file cat_inode.hpp.

## Member Data Documentation

## ◆ ea

ea_attributs* libdar::cat_inode::ea
| private

Extended Attributes read or to be written down.

Definition at line 194 of file cat_inode.hpp.

## ◆ ea_crc

crc* libdar::cat_inode::ea_crc
| private

CRC computed on EA.

Definition at line 197 of file cat_inode.hpp.

## ◆ ea_offset

infinint* libdar::cat_inode::ea_offset
| private

offset in archive where to find EA

Definition at line 193 of file cat_inode.hpp.

## ◆ ea_saved

ea_saved_status libdar::cat_inode::ea_saved
| private

inode Extended Attribute status

Definition at line 187 of file cat_inode.hpp.

Referenced by compare().

## ◆ ea_size

infinint* libdar::cat_inode::ea_size
| private

storage size required by EA

Definition at line 195 of file cat_inode.hpp.

## ◆ edit

archive_version libdar::cat_inode::edit
| private

need to know EA and FSA format used in archive file

Definition at line 206 of file cat_inode.hpp.

## ◆ empty_ea

const ea_attributs libdar::cat_inode::empty_ea
| staticprivate

Definition at line 214 of file cat_inode.hpp.

## ◆ fs_dev

infinint* libdar::cat_inode::fs_dev
| private

filesystem ID on which resides the inode (only used when read from filesystem)

Definition at line 205 of file cat_inode.hpp.

## ◆ fsa_crc

crc* libdar::cat_inode::fsa_crc
| private

CRC computed on FSA.

Definition at line 203 of file cat_inode.hpp.

## ◆ fsa_families

infinint* libdar::cat_inode::fsa_families
| private

list of FSA families present for that inode (set to nullptr in fsa_none mode)

Definition at line 199 of file cat_inode.hpp.

Referenced by fsa_get_families().

## ◆ fsa_offset

infinint* libdar::cat_inode::fsa_offset
| private

offset in archive where to find FSA # always allocated (to be reviewed)

Definition at line 200 of file cat_inode.hpp.

## ◆ fsa_saved

fsa_saved_status libdar::cat_inode::fsa_saved
| private

inode Filesystem Specific Attribute status

Definition at line 188 of file cat_inode.hpp.

## ◆ fsa_size

infinint* libdar::cat_inode::fsa_size
| private

storage size required for FSA

Definition at line 202 of file cat_inode.hpp.

## ◆ fsal

filesystem_specific_attribute_list* libdar::cat_inode::fsal
| private

Filesystem Specific Attributes read or to be written down # only allocated if fsa_saved if set to FULL.

Definition at line 201 of file cat_inode.hpp.

## ◆ gid

infinint libdar::cat_inode::gid
| private

inode owner's group ID

Definition at line 182 of file cat_inode.hpp.

## ◆ last_acc

datetime libdar::cat_inode::last_acc
| private

last access time (atime)

Definition at line 184 of file cat_inode.hpp.

## ◆ last_cha

datetime libdar::cat_inode::last_cha
| private

last inode meta data change (ctime)

Definition at line 186 of file cat_inode.hpp.

Referenced by ea_get_crc_size().

## ◆ last_mod

datetime libdar::cat_inode::last_mod
| private

last modification time (mtime)

Definition at line 185 of file cat_inode.hpp.

## ◆ perm

U_16 libdar::cat_inode::perm
| private

inode's permission

Definition at line 183 of file cat_inode.hpp.

## ◆ small_read

bool libdar::cat_inode::small_read
| private

whether we the object has been built with sequential-reading

Definition at line 190 of file cat_inode.hpp.

## ◆ uid

infinint libdar::cat_inode::uid
| private

inode owner's user ID

Definition at line 181 of file cat_inode.hpp.

The documentation for this class was generated from the following file:

- cat_inode.hpp