Disk ARchive  2.5.0
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
filtre.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21 
25 
26 #ifndef FILTRE_HPP
27 #define FILTRE_HPP
28 
29 #include "../my_config.h"
30 #include <vector>
31 #include "mask.hpp"
32 #include "pile.hpp"
33 #include "catalogue.hpp"
34 #include "path.hpp"
35 #include "statistics.hpp"
36 #include "criterium.hpp"
37 #include "archive_options.hpp"
38 
39 namespace libdar
40 {
41 
44 
45  extern void filtre_restore(user_interaction & dialog, //< for user interaction
46  memory_pool *pool, //< set to nullptr or point to the memory pool to use for memory allocation
47  const mask &filtre, //< which filename to restore
48  const mask & subtree, //< which directory and paths to restore
49  const catalogue & cat, //< table of content to extract information from
50  const path & fs_racine, //< root path under which to restore directiry tree and files
51  bool fs_warn_overwrite, //< whether to warn before overwriting (to be replaced by overwriting policy)
52  bool info_details, //< whether to display processing messages
53  bool display_treated, //< whether to display treated files
54  bool display_treated_only_dir, //< whether to only display current directory of treated file
55  bool display_skipped, //< whether to display skipped files
56  statistics & st, //< statistics result about the operation
57  const mask & ea_mask, //< defines EA to restore/not restore
58  bool flat, //< if true, directories are not restores, all files are placed directly at in fs_racine directory
59  cat_inode::comparison_fields what_to_check, //< which file properties to restore
60  bool warn_remove_no_match, //< wether to warn for file to remove not matching the expected type
61  bool empty, //< dry-run execution
62  bool empty_dir, //< whether to restore directories that do contain any file to restore
63  const crit_action & x_overwrite, //< how and whether to overwrite files
64  archive_options_extract::t_dirty dirty, //< whether to restore dirty files
65  bool only_deleted, //< whether to only consider deleted files
66  bool not_deleted, //< wether to consider deleted files
67  const fsa_scope & scope); //< scope of FSA to take into account
68 
69  extern void filtre_sauvegarde(user_interaction & dialog,
70  memory_pool *pool,
71  const mask &filtre,
72  const mask &subtree,
73  const pile_descriptor & pdesc,
74  catalogue & cat,
75  const catalogue & ref,
76  const path & fs_racine,
77  bool info_details,
78  bool display_treated,
79  bool display_treated_only_dir,
80  bool display_skipped,
81  bool display_finished,
82  statistics & st,
83  bool make_empty_dir,
84  const mask & ea_mask,
85  const mask &compr_mask,
86  const infinint & min_compr_size,
87  bool nodump,
88  const infinint & hourshift,
89  bool alter_time,
90  bool furtive_read_mode,
91  bool same_fs,
92  cat_inode::comparison_fields what_to_check,
93  bool snapshot,
94  bool cache_directory_tagging,
95  bool security_check,
96  const infinint & repeat_count,
97  const infinint & repeat_byte,
98  const infinint & fixed_date,
99  const infinint & sparse_file_min_size,
100  const std::string & backup_hook_file_execute,
101  const mask & backup_hook_file_mask,
102  bool ignore_unknown,
103  const fsa_scope & scope,
104  const std::string & exclude_by_ea);
105 
106  extern void filtre_difference(user_interaction & dialog,
107  memory_pool *pool,
108  const mask &filtre,
109  const mask &subtree,
110  const catalogue & cat,
111  const path & fs_racine,
112  bool info_details,
113  bool display_treated,
114  bool display_treated_only_dir,
115  bool display_skipped,
116  statistics & st,
117  const mask & ea_mask,
118  bool alter_time,
119  bool furtive_read_mode,
120  cat_inode::comparison_fields what_to_check,
121  const infinint & hourshift,
122  bool compare_symlink_date,
123  const fsa_scope & scope,
124  bool isolated_mode);
125 
126  extern void filtre_test(user_interaction & dialog,
127  memory_pool *pool,
128  const mask &filtre,
129  const mask &subtree,
130  const catalogue & cat,
131  bool info_details,
132  bool display_treated,
133  bool display_treated_only_dir,
134  bool display_skipped,
135  bool empty,
136  statistics & st);
137 
138  extern void filtre_merge(user_interaction & dialog,
139  memory_pool *pool,
140  const mask & filtre,
141  const mask & subtree,
142  const pile_descriptor & pdesc,
143  catalogue & cat,
144  const catalogue * ref1,
145  const catalogue * ref2,
146  bool info_details,
147  bool display_treated,
148  bool display_treated_only_dir,
149  bool display_skipped,
150  statistics & st,
151  bool make_empty_dir,
152  const mask & ea_mask,
153  const mask & compr_mask,
154  const infinint & min_compr_size,
155  bool keep_compressed,
156  const crit_action & overwrite,
157  bool warn_overwrite,
158  bool decremental_mode,
159  const infinint & sparse_file_min_size,
160  const fsa_scope & scope);
161 
162  void filtre_sequentially_read_all_catalogue(catalogue & cat,
163  user_interaction & dialog,
164  bool lax_read_mode);
165 
167 
168 } // end of namespace
169 
170 #endif
contains classes that let the user define the policy for overwriting files
class pile definition. Used to manage a stack of generic_file objects
void filtre_restore(user_interaction &dialog, memory_pool *pool, const mask &filtre, const mask &subtree, const catalogue &cat, const path &fs_racine, bool fs_warn_overwrite, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, const mask &ea_mask, bool flat, cat_inode::comparison_fields what_to_check, bool warn_remove_no_match, bool empty, bool empty_dir, const crit_action &x_overwrite, archive_options_extract::t_dirty dirty, bool only_deleted, bool not_deleted, const fsa_scope &scope)
here is the definition of the path classthe path class handle path and provide several operation on t...
handle the statistic structure that gives a summary of treated files after each operatio ...
here lies a collection of mask classes
this file contains a set of classes used to transmit options to archive operation ...
bool nodump()
returns whether nodump flag support has been activated at compilation time
comparison_fields
flag used to only consider certain fields when comparing/restoring inodes
Definition: cat_inode.hpp:60
here is defined the many classed which is build of the catalogue