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

Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
libdar::data_dir Class Reference
Private

the data_dir class inherits from data_tree and holds the directory tree's parent relationship More...

`#include <data_dir.hpp>`

Inherits libdar::data_tree.

## Public Member Functions
| data_dir (const std::string &name)
| data_dir (generic_file &f, unsigned char db_version)
| data_dir (const data_tree &ref)
| data_dir (const data_dir &ref)
| data_dir (data_dir &&ref)=default
data_dir & | operator= (const data_dir &ref)
data_dir & | operator= (data_dir &&ref) noexcept=default
virtual void | dump (generic_file &f) const override
void | add (const cat_inode *entry, const archive_num &archive)
void | add (const cat_detruit *entry, const archive_num &archive)
const data_tree * | read_child (const std::string &name) const
void | read_all_children (std::vector< std::string > &fils) const
void | finalize_except_self (const archive_num &archive, const datetime &deleted_date, const archive_num &ignore_archives_greater_or_equal)
virtual bool | check_order (user_interaction &dialog, const path &current_path, bool &initial_warn) const override
| check date order between archives withing the database ; throw Erange if problem found with date order
virtual void | finalize (const archive_num &archive, const datetime &deleted_date, const archive_num &ignore_archives_greater_or_equal) override
| add deleted entry if no object of the current archive exist and the entry of the previous archive is already present. More...
virtual bool | remove_all_from (const archive_num &archive_to_remove, const archive_num &last_archive) override
| return true if the corresponding file is no more located in any archive (thus, the object is no more usefull in the base)
void | show (database_listing_show_files_callback callback, void *tag, archive_num num, std::string marge="") const
| list the most recent files owned by that archive (or by any archive if num == 0)
virtual void | apply_permutation (archive_num src, archive_num dst) override
virtual void | skip_out (archive_num num) override
| decrement archive numbers above num
virtual void | compute_most_recent_stats (std::deque< infinint > &data, std::deque< infinint > &ea, std::deque< infinint > &total_data, std::deque< infinint > &total_ea) const override
virtual char | obj_signature () const override
virtual bool | fix_corruption () override
bool | data_tree_find (path chemin, const data_tree *&ptr) const
| lookup routine to find a pointer to the dat_tree object corresponding to the given path More...
void | data_tree_update_with (const cat_directory *dir, archive_num archive)
| add a directory to the dat_dir
Public Member Functions inherited from libdar::data_tree
| data_tree (const std::string &name)
| data_tree (generic_file &f, unsigned char db_version)
| data_tree (const data_tree &ref)=default
| data_tree (data_tree &&ref) noexcept=default
data_tree & | operator= (const data_tree &ref)=default
data_tree & | operator= (data_tree &&ref) noexcept=default
std::string | get_name () const
void | set_name (const std::string &name)
db_lookup | get_data (std::set< archive_num > &archive, const datetime &date, bool even_when_removed) const
db_lookup | get_EA (archive_num &archive, const datetime &date, bool even_when_removed) const
| if EA has been saved alone later, returns in which version for the state of the file at the given date.
bool | read_data (archive_num num, datetime &val, db_etat &present) const
| return the date of file's last modification date within the give archive and whether the file has been saved or deleted
bool | read_EA (archive_num num, datetime &val, db_etat &present) const
| return the date of last inode change and whether the EA has been saved or deleted
void | set_data (const archive_num &archive, const datetime &date, db_etat present)
void | set_data (const archive_num &archive, const datetime &date, db_etat present, const crc *base, const crc *result)
void | set_EA (const archive_num &archive, const datetime &date, db_etat present)
void | listing (database_listing_get_version_callback callback, void *tag) const
| list where is saved this file

## Static Public Member Functions
static char | signature ()
static data_dir * | data_tree_read (generic_file &f, unsigned char db_version)
| read a signature and then run the data_dir constructor but aborts if not a data_dir More...
Static Public Member Functions inherited from libdar::data_tree
static char | signature ()

## Private Member Functions
void | add_child (data_tree *fils)
void | remove_child (const std::string &name)
data_tree * | find_or_addition (const std::string &name, bool is_dir, const archive_num &archive)

## Static Private Member Functions
static data_tree * | read_next_in_list_from_file (generic_file &f, unsigned char db_version)
| read signature and depening on it run data_tree or data_dir constructor

## Private Attributes
std::deque< data_tree * > | rejetons

## Detailed Description

the data_dir class inherits from data_tree and holds the directory tree's parent relationship

Definition at line 52 of file data_dir.hpp.

## Member Function Documentation

## ◆ data_tree_find()

bool libdar::data_dir::data_tree_find | ( | path | chemin,
|  | const data_tree *& | ptr
| ) |  | const

lookup routine to find a pointer to the dat_tree object corresponding to the given path

Parameters

  [in] | chemin | is the path to look for
  [out] | ptr | is a pointer to the looked node, if found

Returns
  true if a node could be found in the database

## ◆ data_tree_read()

static data_dir* libdar::data_dir::data_tree_read | ( | generic_file & | f,
|  | unsigned char | db_version
| ) |  |
| static

read a signature and then run the data_dir constructor but aborts if not a data_dir

Note
  the constructors of data_tree and data_dir do not read the signature because its purpose it to know whether the following is a data_dir or data_tree dump() result.

## ◆ finalize()

virtual void libdar::data_dir::finalize | ( | const archive_num & | archive,
|  | const datetime & | deleted_date,
|  | const archive_num & | ignore_archive_greater_or_equal
| ) |  |
| override virtual

add deleted entry if no object of the current archive exist and the entry of the previous archive is already present.

Parameters

  [in] | archive | is the number of the archive to finalize
  [in] | deleted_date | date of deletion to use for inode removal when no information can be grabbed from the archive (this date is taken from the parent dir last modification date)
  [in] | ignore_archive_greater_or_equal | ignore archives which number is greater or equal than "ignore_archive_greater_or_equal" as if they were not present in the database. If set to zero, no archive is ignored.

Reimplemented from libdar::data_tree.

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

- data_dir.hpp