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

Loading...
Searching...
No Matches
filesystem_tools.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_TOOLS_HPP
27#define FILESYSTEM_TOOLS_HPP
28
29#include "../my_config.h"
30
31 extern "C"
32{
33
34} // end extern "C"
35
36#include "infinint.hpp"
37#include "generic_file.hpp"
38#include "fsa_family.hpp"
39#include "cat_all_entrees.hpp"
40#include "crc.hpp"
41#include "user_interaction.hpp"
42#include "path.hpp"
43#include "fichier_local.hpp"
44
45#include <string>
46
47 namespace libdar
48{
51
52 bool filesystem_tools_has_immutable(const cat_inode & arg);
53 void filesystem_tools_set_immutable(const std::string & target, bool val, user_interaction &ui);
54 void filesystem_tools_supprime(user_interaction & ui, const std::string & ref);
55 void filesystem_tools_widen_perm(user_interaction & dialog,
56 const cat_inode & ref,
57 const std::string & chem,
58 comparison_fields what_to_check);
59 void filesystem_tools_make_owner_perm(user_interaction & dialog,
60 const cat_inode & ref,
61 const std::string & chem,
62 comparison_fields what_to_check,
63 const fsa_scope & scope);
64 void filesystem_tools_make_date(const cat_inode & ref,
65 const std::string & chem,
66 comparison_fields what_to_check,
67 const fsa_scope & scope);
68
69 void filesystem_tools_attach_ea(const std::string &chemin,
70 cat_inode *ino,
71 const mask & ea_mask);
72 bool filesystem_tools_is_nodump_flag_set(user_interaction & dialog,
73 const path & chem, const std::string & filename,
74 bool info);
75 path *filesystem_tools_get_root_with_symlink(user_interaction & dialog,
76 const path & root,
77 bool info_details);
78 mode_t filesystem_tools_get_file_permission(const std::string & path);
79
81
91
92 void filesystem_tools_make_delta_patch(const std::shared_ptr<user_interaction> & dialog,
93 const cat_file & existing,
94 const std::string & existing_pathname,
95 const cat_file & patcher,
96 const path & directory,
97 bool hard_linked);
98
100
103 fichier_local *filesystem_tools_create_non_existing_file_based_on(const std::shared_ptr<user_interaction> & dialog,
104 std::string filename,
105 path where,
106 std::string & new_filename);
107
108 void filesystem_tools_copy_content_from_to(const std::shared_ptr<user_interaction> & dialog,
109 const std::string & source_path,
110 const std::string & destination_path,
111 const crc *expected_crc);
112
113
115
119 bool filesystem_tools_read_linux_birthtime(const std::string & target, datetime & val);
121
122} // end of namespace
123
124#endif
cat_all_entrees.hpp
include file gathering all entree found in a catalogue
libdar::cat_file
the plain file class
Definition cat_file.hpp:49
libdar::cat_inode
the root class for all cat_inode
Definition cat_inode.hpp:53
libdar::crc
pure virtual class defining interface of a CRC object
Definition dar64-2.8.3-win64/include/dar/crc.hpp:47
libdar::datetime
stores time information
Definition dar64-2.8.3-win64/include/dar/datetime.hpp:59
libdar::fichier_local
filesystem local files
Definition dar64-2.8.3-win64/include/dar/fichier_local.hpp:56
libdar::mask
the generic class, parent of all masks
Definition dar64-2.8.3-win64/include/dar/mask.hpp:62
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition dar64-2.8.3-win64/include/dar/path.hpp:51
libdar::user_interaction
This is a pure virtual class that is used by libdar when interaction with the user is required.
Definition dar64-2.8.3-win64/include/dar/user_interaction.hpp:58
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition dar64-2.8.3-win64/include/dar/archive_aux.hpp:53
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition dar64-2.8.3-win64/include/dar/fsa_family.hpp:70
libdar::filesystem_tools_create_non_existing_file_based_on
fichier_local * filesystem_tools_create_non_existing_file_based_on(const std::shared_ptr< user_interaction > &dialog, std::string filename, path where, std::string &new_filename)
create in dirname a brand-new filename which name derives from filename
libdar::filesystem_tools_make_delta_patch
void filesystem_tools_make_delta_patch(const std::shared_ptr< user_interaction > &dialog, const cat_file &existing, const std::string &existing_pathname, const cat_file &patcher, const path &directory, bool hard_linked)
perform binary patch on filesystem
libdar::filesystem_tools_read_linux_birthtime
bool filesystem_tools_read_linux_birthtime(const std::string &target, datetime &val)
read the birthtime of target inode
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition dar64-2.8.3-win64/include/dar/archive.hpp:47
crc.hpp
class crc definition, used to handle Cyclic Redundancy Checks
fichier_local.hpp
class fichier_local definition. This is a full implementation/inherited class of class fichier_global...
fsa_family.hpp
filesystem specific attributes available families and fsa_scope definition
generic_file.hpp
class generic_file is defined here as well as class fichier
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
path.hpp
here is the definition of the path class
user_interaction.hpp
defines the interaction interface between libdar and users.