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

Loading...
Searching...
No Matches
libdar5.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 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
27#ifndef LIBDAR5_HPP
28#define LIBDAR5_HPP
29
30#include "../my_config.h"
31
32 extern "C"
33{
34#if MUTEX_WORKS
35#if HAVE_PTHREAD_H
36#include <pthread.h>
37#endif
38#endif
39}
40
41#include <string>
42#include "compressor.hpp"
43#include "path.hpp"
44#include "mask.hpp"
45#include "mask_list.hpp"
46#include "integers.hpp"
47#include "infinint.hpp"
48#include "statistics.hpp"
49#include "user_interaction.hpp"
50#include "user_interaction_callback5.hpp"
51#include "deci.hpp"
52#include "archive5.hpp"
53#include "crypto.hpp"
54#include "thread_cancellation.hpp"
55#include "compile_time_features.hpp"
56#include "capabilities.hpp"
57#include "entrepot_libcurl5.hpp"
58#include "fichier_local.hpp"
59#include "entrepot_local.hpp"
60#include "data_tree.hpp"
61#include "database5.hpp"
62#include "tuyau.hpp"
63#include "archive_aux.hpp"
64#include "tools.hpp"
65
68
70#define LIBDAR_XXXXXXXX
71
73#define LIBDAR_NOEXCEPT 0
75#define LIBDAR_EMEMORY 1
77#define LIBDAR_EBUG 2
79#define LIBDAR_EINFININT 3
81#define LIBDAR_ELIMITINT 4
83#define LIBDAR_ERANGE 5
85#define LIBDAR_EDECI 6
87#define LIBDAR_EFEATURE 7
89#define LIBDAR_EHARDWARE 8
91#define LIBDAR_EUSER_ABORT 9
93#define LIBDAR_EDATA 10
95#define LIBDAR_ESCRIPT 11
97#define LIBDAR_ELIBCALL 12
99#define LIBDAR_UNKNOWN 13
101#define LIBDAR_ECOMPILATION 14
103#define LIBDAR_THREAD_CANCEL 15
105
107 namespace libdar5
108{
111
112 // from integers.hpp
113 using libdar::U_8;
114 using libdar::U_16;
115 using libdar::U_32;
116 using libdar::U_64;
117 using libdar::U_I;
118 using libdar::S_8;
119 using libdar::S_16;
120 using libdar::S_32;
121 using libdar::S_64;
122 using libdar::S_I;
123
124 // from infinint.hpp
125 using libdar::infinint;
126
127 // from erreurs.hpp
128 using libdar::Egeneric;
129 using libdar::Ememory;
130 using libdar::Esecu_memory;
131 using libdar::Ebug;
132 using libdar::Einfinint;
133 using libdar::Elimitint;
134 using libdar::Edeci;
135 using libdar::Erange;
136 using libdar::Efeature;
137 using libdar::Ehardware;
138 using libdar::Edata;
139 using libdar::Euser_abort;
140 using libdar::Escript;
141 using libdar::Elibcall;
142 using libdar::Ecompilation;
143 using libdar::Ethread_cancel;
144 using libdar::Esystem;
145
146 // from secu_string.hpp
147 using libdar::secu_string;
148
149 // from path.hpp
150 using libdar::path;
151
152 // from compressor.hpp
153 using libdar::compression;
154 constexpr compression none = compression::none;
155 constexpr compression gzip = compression::gzip;
156 constexpr compression bzip2 = compression::bzip2;
157 constexpr compression lzo = compression::lzo;
158 constexpr compression xz = compression::xz;
159 constexpr compression lzo1x_1_15 = compression::lzo1x_1_15;
160 constexpr compression lzo1x_1 = compression::lzo1x_1;
161
162 inline compression char2compression(char a) { return libdar::char2compression(a); }
163 inline char compression2char(compression c) { return libdar::compression2char(c); }
164 inline std::string compression2string(compression c) { return libdar::compression2string(c); }
165 inline compression string2compression(const std::string & a) { return libdar::string2compression(a); }
166
167 // from crypto.hpp
168 using libdar::crypto_algo;
169 constexpr crypto_algo crypto_none = crypto_algo::none;
170 constexpr crypto_algo crypto_scrambling = crypto_algo::scrambling;
171 constexpr crypto_algo crypto_blowfish = crypto_algo::blowfish;
172 constexpr crypto_algo crypto_aes256 = crypto_algo::aes256;
173 constexpr crypto_algo crypto_twofish256 = crypto_algo::twofish256;
174 constexpr crypto_algo crypto_serpent256 = crypto_algo::serpent256;
175 constexpr crypto_algo crypto_camellia256 = crypto_algo::camellia256;
176
177 using libdar::signator;
178
179 // from statistics.hpp
180 using libdar::statistics;
181
182 // from list_entry.hpp
183 using libdar::list_entry;
184
185 // from entree_stats.hpp
186 using libdar::entree_stats;
187
188 // from archive.hpp
189 // using libdar::archive;
190
191 // from capabilities.hpp
192 using libdar::capa_status;
193 constexpr capa_status capa_set = libdar::capa_status::capa_set;
194 constexpr capa_status capa_clear = libdar::capa_status::capa_clear;
195 constexpr capa_status capa_unknown = libdar::capa_status::capa_unknown;
196
197 // from mask.hpp
198 using libdar::mask;
199 using libdar::bool_mask;
200 using libdar::simple_mask;
201 using libdar::regular_mask;
202 using libdar::not_mask;
203 using libdar::et_mask;
204 using libdar::ou_mask;
205 using libdar::simple_path_mask;
206 using libdar::same_path_mask;
207 using libdar::exclude_dir_mask;
208
209 // from deci.hpp
210 using libdar::deci;
211
212 // from thread_cancellation
213 using libdar::thread_cancellation;
214
215 // from data_tree.hpp
216 using libdar::archive_num;
217
218 // from criterium.hpp
219 using libdar::criterium;
220 using libdar::crit_in_place_is_inode;
221 using libdar::crit_in_place_is_dir;
222 using libdar::crit_in_place_is_file;
223 using libdar::crit_in_place_is_hardlinked_inode;
224 using libdar::crit_in_place_is_new_hardlinked_inode;
225 using libdar::crit_in_place_data_more_recent;
226 using libdar::crit_in_place_data_more_recent_or_equal_to;
227 using libdar::crit_in_place_data_bigger;
228 using libdar::crit_in_place_data_saved;
229 using libdar::crit_in_place_data_dirty;
230 using libdar::crit_in_place_data_sparse;
231 using libdar::crit_in_place_has_delta_sig;
232 using libdar::crit_in_place_EA_present;
233 using libdar::crit_in_place_EA_more_recent;
234 using libdar::crit_in_place_EA_more_recent_or_equal_to;
235 using libdar::crit_in_place_more_EA;
236 using libdar::crit_in_place_EA_bigger;
237 using libdar::crit_in_place_EA_saved;
238 using libdar::crit_same_type;
239 using libdar::crit_not;
240 using libdar::crit_and;
241 using libdar::crit_or;
242 using libdar::crit_invert;
243
244 // from crit_action.hpp
245 using libdar::over_action_data;
246 constexpr over_action_data data_preserve = libdar::over_action_data::data_preserve;
247 constexpr over_action_data data_overwrite = libdar::over_action_data::data_overwrite;
248 constexpr over_action_data data_preserve_mark_already_saved = libdar::over_action_data::data_preserve_mark_already_saved;
249 constexpr over_action_data data_overwrite_mark_already_saved = libdar::over_action_data::data_overwrite_mark_already_saved;
250 constexpr over_action_data data_remove = libdar::over_action_data::data_remove;
251 constexpr over_action_data data_undefined = libdar::over_action_data::data_undefined;
252 constexpr over_action_data data_ask = libdar::over_action_data::data_ask;
253
254 using libdar::over_action_ea;
255 constexpr over_action_ea EA_preserve = libdar::over_action_ea::EA_preserve;
256 constexpr over_action_ea EA_overwrite = libdar::over_action_ea::EA_overwrite;
257 constexpr over_action_ea EA_clear = libdar::over_action_ea::EA_clear;
258 constexpr over_action_ea EA_preserve_mark_already_saved = libdar::over_action_ea::EA_preserve_mark_already_saved;
259 constexpr over_action_ea EA_overwrite_mark_already_saved = libdar::over_action_ea::EA_overwrite_mark_already_saved;
260 constexpr over_action_ea EA_merge_preserve = libdar::over_action_ea::EA_merge_preserve;
261 constexpr over_action_ea EA_merge_overwrite = libdar::over_action_ea::EA_merge_overwrite;
262 constexpr over_action_ea EA_undefined = libdar::over_action_ea::EA_undefined;
263 constexpr over_action_ea EA_ask = libdar::over_action_ea::EA_ask;
264
265 using libdar::crit_action;
266 using libdar::crit_constant_action;
267 using libdar::testing;
268 using libdar::crit_chain;
269
270 // from mask_list.hpp
271 using libdar::mask_list;
272
273 // from hash_fichier.hpp
274 using libdar::hash_algo;
275 constexpr hash_algo hash_none = hash_algo::none;
276 constexpr hash_algo hash_md5 = hash_algo::md5;
277 constexpr hash_algo hash_sha1 = hash_algo::sha1;
278 constexpr hash_algo hash_sha512= hash_algo::sha512;
279
280 // from fsa_family.hpp
281 using libdar::fsa_family;
282 constexpr fsa_family fsaf_hfs_plus = fsa_family::fsaf_hfs_plus;
283 constexpr fsa_family fsaf_linux_extX = fsa_family::fsaf_linux_extX;
284
285 using libdar::fsa_nature;
286 constexpr fsa_nature fsan_unset = fsa_nature::fsan_unset;
287 constexpr fsa_nature fsan_creation_date = fsa_nature::fsan_creation_date;
288 constexpr fsa_nature fsan_append_only = fsa_nature::fsan_append_only;
289 constexpr fsa_nature fsan_compressed = fsa_nature::fsan_compressed;
290 constexpr fsa_nature fsan_no_dump = fsa_nature::fsan_no_dump;
291 constexpr fsa_nature fsan_immutable = fsa_nature::fsan_immutable;
292 constexpr fsa_nature fsan_data_journaling = fsa_nature::fsan_data_journaling;
293 constexpr fsa_nature fsan_secure_deletion = fsa_nature::fsan_secure_deletion;
294 constexpr fsa_nature fsan_no_tail_merging = fsa_nature::fsan_no_tail_merging;
295 constexpr fsa_nature fsan_undeletable = fsa_nature::fsan_undeletable;
296 constexpr fsa_nature fsan_noatime_update = fsa_nature::fsan_noatime_update;
297 constexpr fsa_nature fsan_synchronous_directory = fsa_nature::fsan_synchronous_directory;
298 constexpr fsa_nature fsan_synchronous_udpdate = fsa_nature::fsan_synchronous_update;
299 constexpr fsa_nature fsan_top_of_dir_hierarchy = fsa_nature::fsan_top_of_dir_hierarchy;
300
301 using libdar::fsa_scope;
302 inline fsa_scope all_fsa_families() { return libdar::all_fsa_families(); }
303
304 // from generic_file.hpp
305 using libdar::generic_file;
306 using libdar::gf_mode;
307 constexpr gf_mode gf_read_only = gf_mode::gf_read_only;
308 constexpr gf_mode gf_write_only = gf_mode::gf_write_only;
309 constexpr gf_mode gf_read_write = gf_mode::gf_read_write;
310
311 // from tools.hpp
312 using libdar::tools_printf;
313 using libdar::tools_getcwd;
314 using libdar::tools_get_extended_size;
315 using libdar::tools_my_atoi;
316 using libdar::tools_octal2int;
317
318 // from compile_time_features.hpp
319 namespace compile_time
320 {
321 using namespace libdar::compile_time;
322 }
323
324 // from fichier_local.hpp
325 using libdar::fichier_local;
326
327 // from mycurl_protocol.hpp
328 using libdar::mycurl_protocol;
329 constexpr mycurl_protocol proto_ftp = mycurl_protocol::proto_ftp;
330 constexpr mycurl_protocol proto_sftp = mycurl_protocol::proto_sftp;
331
332 inline mycurl_protocol string_to_mycurl_protocol(const std::string & arg) { return libdar::string_to_mycurl_protocol(arg); }
333
334 // from memory_file.hpp
335 using libdar::memory_file;
336
337 // from entrepot_local
338 using libdar::entrepot_local;
339
340 // from datetime
341 using libdar::datetime;
342
343 // from tuyau
344 using libdar::tuyau;
345
346 // from archive_aux.hpp
347 using libdar::modified_data_detection;
348 using libdar::comparison_fields;
349 constexpr comparison_fields cf_all = comparison_fields::all;
350 constexpr comparison_fields cf_ignore_owner = comparison_fields::ignore_owner;
351 constexpr comparison_fields cf_mtime = comparison_fields::mtime;
352 constexpr comparison_fields cf_inode_type = comparison_fields::inode_type;
353
355 const U_I LIBDAR_COMPILE_TIME_MAJOR = 5;
357 const U_I LIBDAR_COMPILE_TIME_MEDIUM = 202;
359 const U_I LIBDAR_COMPILE_TIME_MINOR = 3;
360
362 // LIBDAR INITIALIZATION METHODS //
363 // //
364 // A FUNCTION OF THE get_version*() FAMILY *MUST* BE CALLED //
365 // BEFORE ANY OTHER FUNCTION OF THIS LIBRARY //
366 // //
367 // CLIENT PROGRAM MUST CHECK THAT THE MAJOR NUMBER RETURNED //
368 // BY THIS CALL IS NOT GREATER THAN THE VERSION USED AT COMPILATION //
369 // TIME. IF SO, THE PROGRAM MUST ABORT AND RETURN A WARNING TO THE //
370 // USER TELLING THE DYNAMICALLY LINKED VERSION IS TOO RECENT AND NOT //
371 // COMPATIBLE WITH THIS SOFTWARE. THE MESSAGE MUST INVITE THE USER //
372 // TO UPGRADE HIS SOFTWARE WITH A MORE RECENT VERSION COMPATIBLE WITH //
373 // THIS LIBDAR RELEASE. //
375
377
386 extern void get_version(U_I & major, U_I & medium, U_I & minor, bool init_libgcrypt = true);
387
389
401 extern void get_version_noexcept(U_I & major, U_I & medium, U_I & minor, U_16 & exception, std::string & except_msg, bool init_libgcrypt = true);
402
403
404
406 // CLOSING/CLEANING LIBDAR //
408
409 // while libdar has only a single boolean as global variable
410 // that defines whether the library is initialized or not
411 // it must proceed to mutex, and dependent libraries initializations
412 // (liblzo, libgcrypt, etc.), which is done during the get_version() call
413 // Some library also need to clear some data so the following call
414 // is provided in that aim and must be called when libdar will no more
415 // be used by the application.
416
417 extern void close_and_clean();
418
419
421 // WRAPPER FUNCTIONS AROUND archive class methods to trap exceptions and convert them in error code and message
422 // these are intended for C program/programmers not enough confident with C++.
423 //
424 // FOR LIBDAR C++ APPLICATIONS, YOU WOULD RATHER USE THE archive C++ CLASS THAN THESE FOLLOWING WRAPPERS
425 //
427
428
430
434 extern archive* open_archive_noexcept(user_interaction & dialog,
435 const path & chem, const std::string & basename,
436 const std::string & extension,
437 const archive_options_read & options,
438 U_16 & exception,
439 std::string & except_msg);
440
441
443
447 extern archive *create_archive_noexcept(user_interaction & dialog,
448 const path & fs_root,
449 const path & sauv_path,
450 const std::string & filename,
451 const std::string & extension,
452 const archive_options_create & options,
453 statistics * progressive_report,
454 U_16 & exception,
455 std::string & except_msg);
456
457
458
460
464 extern archive *isolate_archive_noexcept(user_interaction & dialog,
465 archive *ptr,
466 const path &sauv_path,
467 const std::string & filename,
468 const std::string & extension,
469 const archive_options_isolate & options,
470 U_16 & exception,
471 std::string & except_msg);
472
474
478 extern archive *merge_archive_noexcept(user_interaction & dialog,
479 const path & sauv_path,
480 archive *ref_arch1,
481 const std::string & filename,
482 const std::string & extension,
483 const archive_options_merge & options,
484 statistics * progressive_report,
485 U_16 & exception,
486 std::string & except_msg);
487
488
490
494 extern void close_archive_noexcept(archive *ptr,
495 U_16 & exception,
496 std::string & except_msg);
497
498
500
504 extern statistics op_extract_noexcept(user_interaction & dialog,
505 archive *ptr,
506 const path &fs_root,
507 const archive_options_extract & options,
508 statistics * progressive_report,
509 U_16 & exception,
510 std::string & except_msg);
511
512
514
518 extern void op_listing_noexcept(user_interaction & dialog,
519 archive *ptr,
520 const archive_options_listing & options,
521 U_16 & exception,
522 std::string & except_msg);
523
524
526
530 extern statistics op_diff_noexcept(user_interaction & dialog,
531 archive *ptr,
532 const path & fs_root,
533 const archive_options_diff & options,
534 statistics * progressive_report,
535 U_16 & exception,
536 std::string & except_msg);
537
538
540
544 extern statistics op_test_noexcept(user_interaction & dialog,
545 archive *ptr,
546 const archive_options_test & options,
547 statistics * progressive_report,
548 U_16 & exception,
549 std::string & except_msg);
550
551
553
557 extern bool get_children_of_noexcept(user_interaction & dialog,
558 archive *ptr,
559 const std::string & dir,
560 U_16 & exception,
561 std::string & except_msg);
562
563
564
566 // TOOLS ROUTINES //
568
569
571
581 extern char *libdar_str2charptr_noexcept(const std::string & x, U_16 & exception, std::string & except_msg);
582
584 // THREAD CANCELLATION ROUTINES //
586
587#if MUTEX_WORKS
589
595 extern void cancel_thread(pthread_t tid, bool immediate = true, U_64 flag = 0);
596
598
601 extern bool cancel_status(pthread_t tid);
602
604
608 extern bool cancel_clear(pthread_t tid);
609#endif
610
611
613
614} // end of namespace
615
616#endif
archive5.hpp
API v5 backward compatible class archive.
archive_aux.hpp
set of datastructures used to interact with a catalogue object
capabilities.hpp
provide information about current thread (underlying using the widthdrawn POSIX.1e API)
libdar5::archive
the archive class realizes the most general operations on archives
Definition archive5.hpp:55
libdar5::user_interaction
This is a pure virtual class that is used by libdar when interaction with the user is required.
Definition user_interaction5.hpp:88
libdar::Ebug
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
Definition erreurs.hpp:163
libdar::Ecompilation
exception used when a requested fearture has not beed activated at compilation time
Definition erreurs.hpp:366
libdar::Edata
exception used when an error concerning the treated data has been met
Definition erreurs.hpp:312
libdar::Edeci
exception used to signal convertion problem between infinint and string (decimal representation)
Definition erreurs.hpp:239
libdar::Efeature
exception used when a requested feature is not (yet) implemented
Definition erreurs.hpp:257
libdar::Egeneric
this is the parent class of all exception classes.
Definition erreurs.hpp:52
libdar::Ehardware
exception used when hardware problem is found
Definition erreurs.hpp:275
libdar::Einfinint
exception used when arithmetic error is detected when operating on infinint
Definition erreurs.hpp:184
libdar::Elibcall
exception used to signal an error in the argument given to libdar call of the API
Definition erreurs.hpp:348
libdar::Elimitint
exception used when a limitint overflow is detected, the maximum value of the limitint has been excee...
Definition erreurs.hpp:202
libdar::Ememory
exception used when memory has been exhausted
Definition erreurs.hpp:127
libdar::Erange
exception used to signal range error
Definition erreurs.hpp:220
libdar::Escript
exception used when error the inter-slice user command returned an error code
Definition erreurs.hpp:330
libdar::Esecu_memory
exception used when secure memory has been exhausted
Definition erreurs.hpp:144
libdar::Esystem
exception used to carry system error
Definition erreurs.hpp:406
libdar::Ethread_cancel
exception used when the thread libdar is running in is asked to stop
Definition erreurs.hpp:383
libdar::Euser_abort
exception used to signal that the user has aborted the operation
Definition erreurs.hpp:293
libdar::archive_num
class archive_num stores the position of an archive inside a dar_manager database
Definition archive_num.hpp:47
libdar::archive_options_extract
class holding optional parameters used to extract files from an existing archive
Definition archive_options.hpp:1312
libdar::archive_options_test
class holding optional parameters used to test the structure coherence of an existing archive
Definition archive_options.hpp:1693
libdar::bool_mask
boolean mask, either always true or false
Definition mask.hpp:101
libdar::crit_action
the global action for overwriting
Definition crit_action.hpp:81
libdar::crit_and
realises the AND operator
Definition criterium.hpp:507
libdar::crit_chain
the crit_chain class sequences crit_actions up to full definition of the action
Definition crit_action.hpp:188
libdar::crit_constant_action
the basic constant action
Definition crit_action.hpp:115
libdar::crit_in_place_EA_bigger
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
Definition criterium.hpp:428
libdar::crit_in_place_EA_more_recent_or_equal_to
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument...
Definition criterium.hpp:385
libdar::crit_in_place_EA_more_recent
returns true if the EA of the first entry is more recent or equal to the one of the second entry
Definition criterium.hpp:361
libdar::crit_in_place_EA_present
Definition criterium.hpp:339
libdar::crit_in_place_EA_saved
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
Definition criterium.hpp:447
libdar::crit_in_place_data_bigger
returns true if the data of the first entry is bigger or equal to the one of the second entry
Definition criterium.hpp:224
libdar::crit_in_place_data_dirty
return true if the entry is a dirty file (or hard linked dirty file)
Definition criterium.hpp:262
libdar::crit_in_place_data_more_recent_or_equal_to
If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mti...
Definition criterium.hpp:201
libdar::crit_in_place_data_more_recent
returns true if the data of the first entry is more recent or of the same date of the one of the seco...
Definition criterium.hpp:177
libdar::crit_in_place_data_saved
if the entry is not an inode the result is also true
Definition criterium.hpp:245
libdar::crit_in_place_data_sparse
return true if the entry is a sparse file (or hard linked sparse file)
Definition criterium.hpp:278
libdar::crit_in_place_has_delta_sig
return true if the entry has delta signature
Definition criterium.hpp:295
libdar::crit_in_place_is_dir
returns true if the first entry is a cat_directory (whatever is the second)
Definition criterium.hpp:104
libdar::crit_in_place_is_file
returns true if the first entry is a plain file (whatever is the second)
Definition criterium.hpp:121
libdar::crit_in_place_is_hardlinked_inode
returns true if the first entry is a inode with several hard links (whatever is the second entry)
Definition criterium.hpp:139
libdar::crit_in_place_is_inode
returns true if the first entry is an inode (whatever is the second)
Definition criterium.hpp:87
libdar::crit_in_place_is_new_hardlinked_inode
Definition criterium.hpp:158
libdar::crit_in_place_more_EA
returns true if the first entry has more or even EA (in number not in size) than the second entry
Definition criterium.hpp:408
libdar::crit_not
realises the negation of the criterium given in argument to its constructor
Definition criterium.hpp:484
libdar::crit_same_type
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
Definition criterium.hpp:467
libdar::criterium
the generic criterium class, parent of all criterium
Definition criterium.hpp:52
libdar::datetime
stores time information
Definition datetime.hpp:59
libdar::deci
decimal class, convert infinint from and to decimal represention
Definition deci.hpp:51
libdar::entrepot_local
Definition entrepot_local.hpp:48
libdar::et_mask
makes an AND operator between two or more masks
Definition mask.hpp:273
libdar::exclude_dir_mask
matches if string is the given constructor string or a sub directory of it
Definition mask.hpp:458
libdar::fichier_local
filesystem local files
Definition fichier_local.hpp:56
libdar::generic_file
this is the interface class from which all other data transfer classes inherit
Definition generic_file.hpp:77
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::list_entry
Definition list_entry.hpp:60
libdar::mask_list
the mask_list class, matches string that are present in a given file
Definition mask_list.hpp:51
libdar::mask
the generic class, parent of all masks
Definition mask.hpp:62
libdar::memory_file
generic_file stored in memory
Definition memory_file.hpp:41
libdar::not_mask
negation of another mask
Definition mask.hpp:227
libdar::ou_mask
makes the OR operator between two or more masks
Definition mask.hpp:360
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
libdar::regular_mask
matches regular expressions (see "man 7 regex")
Definition mask.hpp:174
libdar::same_path_mask
matches if string is exactly the given mask (no wilde card expression)
Definition mask.hpp:427
libdar::secu_string
class secu_string
Definition secu_string.hpp:54
libdar::simple_mask
matches as done on shell command lines (see "man 7 glob")
Definition mask.hpp:131
libdar::simple_path_mask
string matches if it is subdir of mask or mask is a subdir of expression
Definition mask.hpp:396
libdar::statistics
class used by libdar::archive class to give a summary of treated file during and after an operation
Definition statistics.hpp:70
libdar::testing
the testing class binds criterium to actions
Definition crit_action.hpp:143
libdar::thread_cancellation
class to be used as parent to provide checkpoints to inherited classes
Definition thread_cancellation.hpp:69
libdar::tuyau
pipe implementation under the generic_file interface.
Definition tuyau.hpp:49
compile_time_features.hpp
nested namespace containing routines that give features activated at compile time
compressor.hpp
compression engine implementation
crypto.hpp
the crypto algoritm definition
data_tree.hpp
base classes used to store entree information in dar_manager databases
database5.hpp
this file holds the database class definition as defined in API version 5
deci.hpp
manages the decimal representation of infinint
entrepot_libcurl5.hpp
defines the implementation for remote filesystem entrepot using libcurl
entrepot_local.hpp
defines the implementation for local filesystem entrepot The entrepot_local correspond to the local f...
fichier_local.hpp
class fichier_local definition. This is a full implementation/inherited class of class fichier_global...
libdar5::get_version_noexcept
void get_version_noexcept(U_I &major, U_I &medium, U_I &minor, U_16 &exception, std::string &except_msg, bool init_libgcrypt=true)
return the libdar version, and make libdar initialization (does not throw exceptions)
libdar5::LIBDAR_COMPILE_TIME_MINOR
const U_I LIBDAR_COMPILE_TIME_MINOR
libdar Minor version defined at compilation time
Definition libdar5.hpp:359
libdar5::open_archive_noexcept
archive * open_archive_noexcept(user_interaction &dialog, const path &chem, const std::string &basename, const std::string &extension, const archive_options_read &options, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "read" constructor
libdar5::libdar_str2charptr_noexcept
char * libdar_str2charptr_noexcept(const std::string &x, U_16 &exception, std::string &except_msg)
routine provided to convert std::string to char *
libdar5::get_children_of_noexcept
bool get_children_of_noexcept(user_interaction &dialog, archive *ptr, const std::string &dir, U_16 &exception, std::string &except_msg)
this is wrapper around the get_children_of method
libdar5::op_extract_noexcept
statistics op_extract_noexcept(user_interaction &dialog, archive *ptr, const path &fs_root, const archive_options_extract &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_extract method
libdar5::create_archive_noexcept
archive * create_archive_noexcept(user_interaction &dialog, const path &fs_root, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_create &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "create" constructor
libdar5::op_listing_noexcept
void op_listing_noexcept(user_interaction &dialog, archive *ptr, const archive_options_listing &options, U_16 &exception, std::string &except_msg)
this is wrapper around the op_listing method
libdar5::op_diff_noexcept
statistics op_diff_noexcept(user_interaction &dialog, archive *ptr, const path &fs_root, const archive_options_diff &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_diff method
libdar5::LIBDAR_COMPILE_TIME_MAJOR
const U_I LIBDAR_COMPILE_TIME_MAJOR
libdar Major version defined at compilation time
Definition libdar5.hpp:355
libdar5::LIBDAR_COMPILE_TIME_MEDIUM
const U_I LIBDAR_COMPILE_TIME_MEDIUM
libdar Medium version defined at compilation time
Definition libdar5.hpp:357
libdar5::isolate_archive_noexcept
archive * isolate_archive_noexcept(user_interaction &dialog, archive *ptr, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_isolate &options, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "isolate" constructor
libdar5::op_test_noexcept
statistics op_test_noexcept(user_interaction &dialog, archive *ptr, const archive_options_test &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_test method
libdar5::close_archive_noexcept
void close_archive_noexcept(archive *ptr, U_16 &exception, std::string &except_msg)
this is wrapper around the archive destructor
libdar5::merge_archive_noexcept
archive * merge_archive_noexcept(user_interaction &dialog, const path &sauv_path, archive *ref_arch1, const std::string &filename, const std::string &extension, const archive_options_merge &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "merging" constructor
libdar5::get_version
void get_version(U_I &major, U_I &medium, U_I &minor, bool init_libgcrypt=true)
return the libdar version, and make libdar initialization (may throw Exceptions)
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition archive_aux.hpp:44
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition archive_aux.hpp:53
libdar::compression2string
std::string compression2string(compression c)
convert a compression to its string representation
libdar::over_action_ea
over_action_ea
the possible action for overwriting EA
Definition crit_action.hpp:62
libdar::compression2char
char compression2char(compression c, bool per_block=false)
convert a compression value to a char for storing in archive
libdar::all_fsa_families
fsa_scope all_fsa_families()
provides a scope containing all FSA families
libdar::char2compression
compression char2compression(char a)
convert a char as stored in archive to its compression value
libdar::mycurl_protocol
mycurl_protocol
libcurl protocols supported by libdar
Definition mycurl_protocol.hpp:49
libdar::hash_algo
hash_algo
hashing algorithm available
Definition archive_aux.hpp:63
libdar::string2compression
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition fsa_family.hpp:70
libdar::compression
compression
the different compression algorithm available
Definition compression.hpp:46
libdar::crypto_algo
crypto_algo
the different cypher available for encryption (strong or weak)
Definition crypto.hpp:50
libdar::string_to_mycurl_protocol
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
libdar::fsa_family
fsa_family
FSA family.
Definition fsa_family.hpp:42
libdar::over_action_data
over_action_data
the possible actions for overwriting data
Definition crit_action.hpp:47
libdar::fsa_nature
fsa_nature
FSA nature.
Definition fsa_family.hpp:48
libdar::EA_ask
@ EA_ask
ask for user decision about EA
Definition crit_action.hpp:71
libdar::EA_merge_preserve
@ EA_merge_preserve
merge EA but do not overwrite existing EA of 'in place' by one of the same name of 'to be added' inod...
Definition crit_action.hpp:68
libdar::EA_preserve_mark_already_saved
@ EA_preserve_mark_already_saved
drop any EA but mark them as already saved in the archive of reference (ctime is the one of the 'in p...
Definition crit_action.hpp:66
libdar::EA_overwrite
@ EA_overwrite
keep the EA of the 'to be added' entry
Definition crit_action.hpp:64
libdar::EA_preserve
@ EA_preserve
keep the EA of the 'in place' entry
Definition crit_action.hpp:63
libdar::EA_merge_overwrite
@ EA_merge_overwrite
merge EA but if both inode share an EA with the same name, take keep the one of the 'to be added' ino...
Definition crit_action.hpp:69
libdar::EA_undefined
@ EA_undefined
action still undefined at this step of the evaluation
Definition crit_action.hpp:70
libdar::EA_clear
@ EA_clear
drop the EA for the elected entry
Definition crit_action.hpp:65
libdar::EA_overwrite_mark_already_saved
@ EA_overwrite_mark_already_saved
drop any EA but mark them as already saved in the archive of reference (ctime is the one of the 'to b...
Definition crit_action.hpp:67
libdar::data_preserve
@ data_preserve
do not overwrite (keep the 'in place' entry)
Definition crit_action.hpp:48
libdar::data_preserve_mark_already_saved
@ data_preserve_mark_already_saved
keep the 'in place' but mark it as already saved in the archive of reference
Definition crit_action.hpp:50
libdar::data_overwrite
@ data_overwrite
overwirte the 'in place' entry by the 'to be added' one
Definition crit_action.hpp:49
libdar::data_ask
@ data_ask
ask for user decision about file's data
Definition crit_action.hpp:54
libdar::data_remove
@ data_remove
remove the original data/EA (file is completely deleted)
Definition crit_action.hpp:52
libdar::data_undefined
@ data_undefined
action still undefined at this step of the evaluation
Definition crit_action.hpp:53
libdar::data_overwrite_mark_already_saved
@ data_overwrite_mark_already_saved
overwrite the 'in place' but mark the 'to be added' as already saved in the archive of reference
Definition crit_action.hpp:51
libdar::capa_status
capa_status
the EFFECTIVE set the value of the associated capability for the calling thread
Definition capabilities.hpp:41
libdar::tools_get_extended_size
infinint tools_get_extended_size(std::string s, U_I base)
convert the given string to infinint taking care of multiplication suffixes like k,...
libdar::tools_getcwd
std::string tools_getcwd()
get current working directory
libdar::tools_octal2int
U_I tools_octal2int(const std::string &perm)
convert octal string to integer
libdar::tools_printf
std::string tools_printf(const char *format,...)
make printf-like formating to a std::string
libdar::gf_mode
gf_mode
generic_file openning modes
Definition gf_mode.hpp:44
libdar::tools_my_atoi
bool tools_my_atoi(const char *a, U_I &val)
ascii to integer conversion
libdar::capa_clear
@ capa_clear
current thread has not the requested capability
Definition capabilities.hpp:42
libdar::capa_set
@ capa_set
current thread has the requested capability
Definition capabilities.hpp:41
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
integers.hpp
are defined here basic integer types that tend to be portable
mask.hpp
here lies a collection of mask classes
mask_list.hpp
here lies a mask that selects files present in a given list
my_config.h
include macro defined by the configure script and some specific additional ones
libdar5
libdar5 namespace encapsulate all libdar symbols
Definition archive5.hpp:37
libdar::compile_time
nested namespace inside libdar
Definition compile_time_features.hpp:45
path.hpp
here is the definition of the path class
statistics.hpp
class handling access to the data summary of treated files after and during each operation
libdar::entree_stats
holds the statistics contents of a catalogue
Definition entree_stats.hpp:49
libdar::signator
signator status
Definition crypto.hpp:63
thread_cancellation.hpp
to be able to cancel libdar operation while running in a given thread.
tools.hpp
a set of general purpose routines
tuyau.hpp
defines the implementation of pipe under the generic_file interface.
user_interaction.hpp
defines the interaction interface between libdar and users.
user_interaction_callback5.hpp
API v5 backward compatible user_interaction_callback class.