Disk ARchive  2.5.2
Full featured and portable backup and archiving tool
filtre.hpp
Go to the documentation of this file.
00001 /*********************************************************************/
00002 // dar - disk archive - a backup/restoration program
00003 // Copyright (C) 2002-2052 Denis Corbin
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 //
00019 // to contact the author : http://dar.linux.free.fr/email.html
00020 /*********************************************************************/
00021 
00025 
00026 #ifndef FILTRE_HPP
00027 #define FILTRE_HPP
00028 
00029 #include "../my_config.h"
00030 #include <vector>
00031 #include "mask.hpp"
00032 #include "pile.hpp"
00033 #include "catalogue.hpp"
00034 #include "path.hpp"
00035 #include "statistics.hpp"
00036 #include "criterium.hpp"
00037 #include "archive_options.hpp"
00038 
00039 namespace libdar
00040 {
00041 
00044 
00045     extern void filtre_restore(user_interaction & dialog, //< for user interaction
00046                    memory_pool *pool,         //< set to nullptr or point to the memory pool to use for memory allocation
00047                    const mask &filtre,        //< which filename to restore
00048                                const mask & subtree,      //< which directory and paths to restore
00049                                const catalogue & cat,     //< table of content to extract information from
00050                                const path & fs_racine,    //< root path under which to restore directiry tree and files
00051                                bool fs_warn_overwrite,    //< whether to warn before overwriting (to be replaced by overwriting policy)
00052                                bool info_details,         //< whether to display processing messages
00053                    bool display_treated,      //< whether to display treated files
00054                    bool display_treated_only_dir, //< whether to only display current directory of treated file
00055                    bool display_skipped,      //< whether to display skipped files
00056                                statistics & st,           //< statistics result about the operation
00057                                const mask & ea_mask,      //< defines EA to restore/not restore
00058                                bool flat,                 //< if true, directories are not restores, all files are placed directly at in fs_racine directory
00059                    cat_inode::comparison_fields what_to_check, //< which file properties to restore
00060                    bool warn_remove_no_match, //< wether to warn for file to remove not matching the expected type
00061                    bool empty,                //< dry-run execution
00062                    bool empty_dir,            //< whether to restore directories that do contain any file to restore
00063                    const crit_action & x_overwrite, //< how and whether to overwrite files
00064                    archive_options_extract::t_dirty dirty, //< whether to restore dirty files
00065                    bool only_deleted,         //< whether to only consider deleted files
00066                    bool not_deleted,          //< wether to consider deleted files
00067                    const fsa_scope & scope);  //< scope of FSA to take into account
00068 
00069     extern void filtre_sauvegarde(user_interaction & dialog,
00070                   memory_pool *pool,
00071                   const mask &filtre,
00072                                   const mask &subtree,
00073                                   const pile_descriptor & pdesc,
00074                                   catalogue & cat,
00075                                   const catalogue & ref,
00076                                   const path & fs_racine,
00077                                   bool info_details,
00078                   bool display_treated,
00079                   bool display_treated_only_dir,
00080                   bool display_skipped,
00081                   bool display_finished,
00082                                   statistics & st,
00083                                   bool make_empty_dir,
00084                   const mask & ea_mask,
00085                                   const mask &compr_mask,
00086                                   const infinint & min_compr_size,
00087                                   bool nodump,
00088                                   const infinint & hourshift,
00089                   bool alter_time,
00090                   bool furtive_read_mode,
00091                   bool same_fs,
00092                   cat_inode::comparison_fields what_to_check,
00093                   bool snapshot,
00094                   bool cache_directory_tagging,
00095                   bool security_check,
00096                   const infinint & repeat_count,
00097                   const infinint & repeat_byte,
00098                   const infinint & fixed_date,
00099                   const infinint & sparse_file_min_size,
00100                   const std::string & backup_hook_file_execute,
00101                   const mask & backup_hook_file_mask,
00102                   bool ignore_unknown,
00103                   const fsa_scope & scope,
00104                   const std::string & exclude_by_ea);
00105 
00106     extern void filtre_difference(user_interaction & dialog,
00107                   memory_pool *pool,
00108                   const mask &filtre,
00109                                   const mask &subtree,
00110                                   const catalogue & cat,
00111                                   const path & fs_racine,
00112                                   bool info_details,
00113                   bool display_treated,
00114                   bool display_treated_only_dir,
00115                   bool display_skipped,
00116                   statistics & st,
00117                   const mask & ea_mask,
00118                   bool alter_time,
00119                   bool furtive_read_mode,
00120                   cat_inode::comparison_fields what_to_check,
00121                   const infinint & hourshift,
00122                   bool compare_symlink_date,
00123                   const fsa_scope & scope,
00124                   bool isolated_mode);
00125 
00126     extern void filtre_test(user_interaction & dialog,
00127                 memory_pool *pool,
00128                 const mask &filtre,
00129                             const mask &subtree,
00130                             const catalogue & cat,
00131                             bool info_details,
00132                 bool display_treated,
00133                 bool display_treated_only_dir,
00134                 bool display_skipped,
00135                 bool empty,
00136                             statistics & st);
00137 
00138     extern void filtre_merge(user_interaction & dialog,
00139                  memory_pool *pool,
00140                  const mask & filtre,
00141                  const mask & subtree,
00142                  const pile_descriptor & pdesc,
00143                  catalogue & cat,
00144                  const catalogue * ref1,
00145                  const catalogue * ref2,
00146                  bool info_details,
00147                  bool display_treated,
00148                  bool display_treated_only_dir,
00149                  bool display_skipped,
00150                  statistics & st,
00151                  bool make_empty_dir,
00152                  const mask & ea_mask,
00153                  const mask & compr_mask,
00154                  const infinint & min_compr_size,
00155                  bool keep_compressed,
00156                  const crit_action & overwrite,
00157                  bool warn_overwrite,
00158                  bool decremental_mode,
00159                  const infinint & sparse_file_min_size,
00160                  const fsa_scope & scope);
00161 
00162     void filtre_sequentially_read_all_catalogue(catalogue & cat,
00163                         user_interaction & dialog,
00164                         bool lax_read_mode);
00165 
00167 
00168 } // end of namespace
00169 
00170 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines