Disk ARchive  2.5.13
Full featured and portable backup and archiving tool
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  bool auto_zeroing_neg_dates);
106 
107  extern void filtre_difference(user_interaction & dialog,
108  memory_pool *pool,
109  const mask &filtre,
110  const mask &subtree,
111  const catalogue & cat,
112  const path & fs_racine,
113  bool info_details,
114  bool display_treated,
115  bool display_treated_only_dir,
116  bool display_skipped,
117  statistics & st,
118  const mask & ea_mask,
119  bool alter_time,
120  bool furtive_read_mode,
121  cat_inode::comparison_fields what_to_check,
122  const infinint & hourshift,
123  bool compare_symlink_date,
124  const fsa_scope & scope,
125  bool isolated_mode);
126 
127  extern void filtre_test(user_interaction & dialog,
128  memory_pool *pool,
129  const mask &filtre,
130  const mask &subtree,
131  const catalogue & cat,
132  bool info_details,
133  bool display_treated,
134  bool display_treated_only_dir,
135  bool display_skipped,
136  bool empty,
137  statistics & st);
138 
139  extern void filtre_merge(user_interaction & dialog,
140  memory_pool *pool,
141  const mask & filtre,
142  const mask & subtree,
143  const pile_descriptor & pdesc,
144  catalogue & cat,
145  const catalogue * ref1,
146  const catalogue * ref2,
147  bool info_details,
148  bool display_treated,
149  bool display_treated_only_dir,
150  bool display_skipped,
151  statistics & st,
152  bool make_empty_dir,
153  const mask & ea_mask,
154  const mask & compr_mask,
155  const infinint & min_compr_size,
156  bool keep_compressed,
157  const crit_action & overwrite,
158  bool warn_overwrite,
159  bool decremental_mode,
160  const infinint & sparse_file_min_size,
161  const fsa_scope & scope);
162 
163  void filtre_sequentially_read_all_catalogue(catalogue & cat,
164  user_interaction & dialog,
165  bool lax_read_mode);
166 
168 
169 } // end of namespace
170 
171 #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
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
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47
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