Loading...
Searching...
No Matches
libdar5.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2025 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef LIBDAR5_HPP
#define LIBDAR5_HPP
#include "../my_config.h"
extern "C"
{
#if MUTEX_WORKS
#if HAVE_PTHREAD_H
#include <pthread.h>
#endif
#endif
}
#include <string>
#include "compressor.hpp"
#include "path.hpp"
#include "mask.hpp"
#include "mask_list.hpp"
#include "integers.hpp"
#include "infinint.hpp"
#include "statistics.hpp"
#include "user_interaction.hpp"
#include "user_interaction_callback5.hpp"
#include "deci.hpp"
#include "archive5.hpp"
#include "crypto.hpp"
#include "thread_cancellation.hpp"
#include "compile_time_features.hpp"
#include "capabilities.hpp"
#include "entrepot_libcurl5.hpp"
#include "fichier_local.hpp"
#include "entrepot_local.hpp"
#include "data_tree.hpp"
#include "database5.hpp"
#include "tuyau.hpp"
#include "archive_aux.hpp"
#include "tools.hpp"
#define LIBDAR_XXXXXXXX
#define LIBDAR_NOEXCEPT 0
#define LIBDAR_EMEMORY 1
#define LIBDAR_EBUG 2
#define LIBDAR_EINFININT 3
#define LIBDAR_ELIMITINT 4
#define LIBDAR_ERANGE 5
#define LIBDAR_EDECI 6
#define LIBDAR_EFEATURE 7
#define LIBDAR_EHARDWARE 8
#define LIBDAR_EUSER_ABORT 9
#define LIBDAR_EDATA 10
#define LIBDAR_ESCRIPT 11
#define LIBDAR_ELIBCALL 12
#define LIBDAR_UNKNOWN 13
#define LIBDAR_ECOMPILATION 14
#define LIBDAR_THREAD_CANCEL 15
namespace libdar5
{
// from integers.hpp
using libdar::U_8;
using libdar::U_16;
using libdar::U_32;
using libdar::U_64;
using libdar::U_I;
using libdar::S_8;
using libdar::S_16;
using libdar::S_32;
using libdar::S_64;
using libdar::S_I;
// from infinint.hpp
using libdar::infinint;
// from erreurs.hpp
using libdar::Egeneric;
using libdar::Ememory;
using libdar::Esecu_memory;
using libdar::Ebug;
using libdar::Einfinint;
using libdar::Elimitint;
using libdar::Edeci;
using libdar::Erange;
using libdar::Efeature;
using libdar::Ehardware;
using libdar::Edata;
using libdar::Euser_abort;
using libdar::Escript;
using libdar::Elibcall;
using libdar::Ecompilation;
using libdar::Ethread_cancel;
using libdar::Esystem;
// from secu_string.hpp
using libdar::secu_string;
// from path.hpp
using libdar::path;
// from compressor.hpp
using libdar::compression;
constexpr compression none = compression::none;
constexpr compression gzip = compression::gzip;
constexpr compression bzip2 = compression::bzip2;
constexpr compression lzo = compression::lzo;
constexpr compression xz = compression::xz;
constexpr compression lzo1x_1_15 = compression::lzo1x_1_15;
constexpr compression lzo1x_1 = compression::lzo1x_1;
inline compression char2compression(char a) { return libdar::char2compression(a); }
inline char compression2char(compression c) { return libdar::compression2char(c); }
inline std::string compression2string(compression c) { return libdar::compression2string(c); }
inline compression string2compression(const std::string & a) { return libdar::string2compression(a); }
// from crypto.hpp
using libdar::crypto_algo;
constexpr crypto_algo crypto_none = crypto_algo::none;
constexpr crypto_algo crypto_scrambling = crypto_algo::scrambling;
constexpr crypto_algo crypto_blowfish = crypto_algo::blowfish;
constexpr crypto_algo crypto_aes256 = crypto_algo::aes256;
constexpr crypto_algo crypto_twofish256 = crypto_algo::twofish256;
constexpr crypto_algo crypto_serpent256 = crypto_algo::serpent256;
constexpr crypto_algo crypto_camellia256 = crypto_algo::camellia256;
using libdar::signator;
// from statistics.hpp
using libdar::statistics;
// from list_entry.hpp
using libdar::list_entry;
// from entree_stats.hpp
using libdar::entree_stats;
// from archive.hpp
// using libdar::archive;
// from capabilities.hpp
using libdar::capa_status;
constexpr capa_status capa_set = libdar::capa_status::capa_set;
constexpr capa_status capa_clear = libdar::capa_status::capa_clear;
constexpr capa_status capa_unknown = libdar::capa_status::capa_unknown;
// from mask.hpp
using libdar::mask;
using libdar::bool_mask;
using libdar::simple_mask;
using libdar::regular_mask;
using libdar::not_mask;
using libdar::et_mask;
using libdar::ou_mask;
using libdar::simple_path_mask;
using libdar::same_path_mask;
using libdar::exclude_dir_mask;
// from deci.hpp
using libdar::deci;
// from thread_cancellation
using libdar::thread_cancellation;
// from data_tree.hpp
using libdar::archive_num;
// from criterium.hpp
using libdar::criterium;
using libdar::crit_in_place_is_inode;
using libdar::crit_in_place_is_dir;
using libdar::crit_in_place_is_file;
using libdar::crit_in_place_is_hardlinked_inode;
using libdar::crit_in_place_is_new_hardlinked_inode;
using libdar::crit_in_place_data_more_recent;
using libdar::crit_in_place_data_more_recent_or_equal_to;
using libdar::crit_in_place_data_bigger;
using libdar::crit_in_place_data_saved;
using libdar::crit_in_place_data_dirty;
using libdar::crit_in_place_data_sparse;
using libdar::crit_in_place_has_delta_sig;
using libdar::crit_in_place_EA_present;
using libdar::crit_in_place_EA_more_recent;
using libdar::crit_in_place_EA_more_recent_or_equal_to;
using libdar::crit_in_place_more_EA;
using libdar::crit_in_place_EA_bigger;
using libdar::crit_in_place_EA_saved;
using libdar::crit_same_type;
using libdar::crit_not;
using libdar::crit_and;
using libdar::crit_or;
using libdar::crit_invert;
// from crit_action.hpp
using libdar::over_action_data;
constexpr over_action_data data_preserve = libdar::over_action_data::data_preserve;
constexpr over_action_data data_overwrite = libdar::over_action_data::data_overwrite;
constexpr over_action_data data_preserve_mark_already_saved = libdar::over_action_data::data_preserve_mark_already_saved;
constexpr over_action_data data_overwrite_mark_already_saved = libdar::over_action_data::data_overwrite_mark_already_saved;
constexpr over_action_data data_remove = libdar::over_action_data::data_remove;
constexpr over_action_data data_undefined = libdar::over_action_data::data_undefined;
constexpr over_action_data data_ask = libdar::over_action_data::data_ask;
using libdar::over_action_ea;
constexpr over_action_ea EA_preserve = libdar::over_action_ea::EA_preserve;
constexpr over_action_ea EA_overwrite = libdar::over_action_ea::EA_overwrite;
constexpr over_action_ea EA_clear = libdar::over_action_ea::EA_clear;
constexpr over_action_ea EA_preserve_mark_already_saved = libdar::over_action_ea::EA_preserve_mark_already_saved;
constexpr over_action_ea EA_overwrite_mark_already_saved = libdar::over_action_ea::EA_overwrite_mark_already_saved;
constexpr over_action_ea EA_merge_preserve = libdar::over_action_ea::EA_merge_preserve;
constexpr over_action_ea EA_merge_overwrite = libdar::over_action_ea::EA_merge_overwrite;
constexpr over_action_ea EA_undefined = libdar::over_action_ea::EA_undefined;
constexpr over_action_ea EA_ask = libdar::over_action_ea::EA_ask;
using libdar::crit_action;
using libdar::crit_constant_action;
using libdar::testing;
using libdar::crit_chain;
// from mask_list.hpp
using libdar::mask_list;
// from hash_fichier.hpp
using libdar::hash_algo;
constexpr hash_algo hash_none = hash_algo::none;
constexpr hash_algo hash_md5 = hash_algo::md5;
constexpr hash_algo hash_sha1 = hash_algo::sha1;
constexpr hash_algo hash_sha512= hash_algo::sha512;
// from fsa_family.hpp
using libdar::fsa_family;
constexpr fsa_family fsaf_hfs_plus = fsa_family::fsaf_hfs_plus;
constexpr fsa_family fsaf_linux_extX = fsa_family::fsaf_linux_extX;
using libdar::fsa_nature;
constexpr fsa_nature fsan_unset = fsa_nature::fsan_unset;
constexpr fsa_nature fsan_creation_date = fsa_nature::fsan_creation_date;
constexpr fsa_nature fsan_append_only = fsa_nature::fsan_append_only;
constexpr fsa_nature fsan_compressed = fsa_nature::fsan_compressed;
constexpr fsa_nature fsan_no_dump = fsa_nature::fsan_no_dump;
constexpr fsa_nature fsan_immutable = fsa_nature::fsan_immutable;
constexpr fsa_nature fsan_data_journaling = fsa_nature::fsan_data_journaling;
constexpr fsa_nature fsan_secure_deletion = fsa_nature::fsan_secure_deletion;
constexpr fsa_nature fsan_no_tail_merging = fsa_nature::fsan_no_tail_merging;
constexpr fsa_nature fsan_undeletable = fsa_nature::fsan_undeletable;
constexpr fsa_nature fsan_noatime_update = fsa_nature::fsan_noatime_update;
constexpr fsa_nature fsan_synchronous_directory = fsa_nature::fsan_synchronous_directory;
constexpr fsa_nature fsan_synchronous_udpdate = fsa_nature::fsan_synchronous_update;
constexpr fsa_nature fsan_top_of_dir_hierarchy = fsa_nature::fsan_top_of_dir_hierarchy;
using libdar::fsa_scope;
inline fsa_scope all_fsa_families() { return libdar::all_fsa_families(); }
// from generic_file.hpp
using libdar::generic_file;
using libdar::gf_mode;
constexpr gf_mode gf_read_only = gf_mode::gf_read_only;
constexpr gf_mode gf_write_only = gf_mode::gf_write_only;
constexpr gf_mode gf_read_write = gf_mode::gf_read_write;
// from tools.hpp
using libdar::tools_printf;
using libdar::tools_getcwd;
using libdar::tools_get_extended_size;
using libdar::tools_my_atoi;
using libdar::tools_octal2int;
// from compile_time_features.hpp
namespace compile_time
{
using namespace libdar::compile_time;
}
// from fichier_local.hpp
using libdar::fichier_local;
// from mycurl_protocol.hpp
using libdar::mycurl_protocol;
constexpr mycurl_protocol proto_ftp = mycurl_protocol::proto_ftp;
constexpr mycurl_protocol proto_sftp = mycurl_protocol::proto_sftp;
inline mycurl_protocol string_to_mycurl_protocol(const std::string & arg) { return libdar::string_to_mycurl_protocol(arg); }
// from memory_file.hpp
using libdar::memory_file;
// from entrepot_local
using libdar::entrepot_local;
// from datetime
using libdar::datetime;
// from tuyau
using libdar::tuyau;
// from archive_aux.hpp
using libdar::modified_data_detection;
using libdar::comparison_fields;
constexpr comparison_fields cf_all = comparison_fields::all;
constexpr comparison_fields cf_ignore_owner = comparison_fields::ignore_owner;
constexpr comparison_fields cf_mtime = comparison_fields::mtime;
constexpr comparison_fields cf_inode_type = comparison_fields::inode_type;
const U_I LIBDAR_COMPILE_TIME_MAJOR = 5;
const U_I LIBDAR_COMPILE_TIME_MEDIUM = 202;
const U_I LIBDAR_COMPILE_TIME_MINOR = 3;
// LIBDAR INITIALIZATION METHODS //
// //
// A FUNCTION OF THE get_version*() FAMILY *MUST* BE CALLED //
// BEFORE ANY OTHER FUNCTION OF THIS LIBRARY //
// //
// CLIENT PROGRAM MUST CHECK THAT THE MAJOR NUMBER RETURNED //
// BY THIS CALL IS NOT GREATER THAN THE VERSION USED AT COMPILATION //
// TIME. IF SO, THE PROGRAM MUST ABORT AND RETURN A WARNING TO THE //
// USER TELLING THE DYNAMICALLY LINKED VERSION IS TOO RECENT AND NOT //
// COMPATIBLE WITH THIS SOFTWARE. THE MESSAGE MUST INVITE THE USER //
// TO UPGRADE HIS SOFTWARE WITH A MORE RECENT VERSION COMPATIBLE WITH //
// THIS LIBDAR RELEASE. //
extern void get_version(U_I & major, U_I & medium, U_I & minor, bool init_libgcrypt = true);
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);
// CLOSING/CLEANING LIBDAR //
// while libdar has only a single boolean as global variable
// that defines whether the library is initialized or not
// it must proceed to mutex, and dependent libraries initializations
// (liblzo, libgcrypt, etc.), which is done during the get_version() call
// Some library also need to clear some data so the following call
// is provided in that aim and must be called when libdar will no more
// be used by the application.
extern void close_and_clean();
// WRAPPER FUNCTIONS AROUND archive class methods to trap exceptions and convert them in error code and message
// these are intended for C program/programmers not enough confident with C++.
//
// FOR LIBDAR C++ APPLICATIONS, YOU WOULD RATHER USE THE archive C++ CLASS THAN THESE FOLLOWING WRAPPERS
//
extern 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);
extern 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);
extern 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);
extern 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);
extern void close_archive_noexcept(archive *ptr,
U_16 & exception,
std::string & except_msg);
extern 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);
extern void op_listing_noexcept(user_interaction & dialog,
archive *ptr,
const archive_options_listing & options,
U_16 & exception,
std::string & except_msg);
extern 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);
extern statistics op_test_noexcept(user_interaction & dialog,
archive *ptr,
const archive_options_test & options,
statistics * progressive_report,
U_16 & exception,
std::string & except_msg);
extern bool get_children_of_noexcept(user_interaction & dialog,
archive *ptr,
const std::string & dir,
U_16 & exception,
std::string & except_msg);
// TOOLS ROUTINES //
extern char *libdar_str2charptr_noexcept(const std::string & x, U_16 & exception, std::string & except_msg);
// THREAD CANCELLATION ROUTINES //
#if MUTEX_WORKS
extern void cancel_thread(pthread_t tid, bool immediate = true, U_64 flag = 0);
extern bool cancel_status(pthread_t tid);
extern bool cancel_clear(pthread_t tid);
#endif
} // end of namespace
#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::comparison_fields::inode_type
@ inode_type
only consider the file type
Definition archive_aux.hpp:57
libdar::comparison_fields::ignore_owner
@ ignore_owner
consider any available field except ownership fields
Definition archive_aux.hpp:55
libdar::comparison_fields::mtime
@ mtime
consider any available field except ownership and permission fields
Definition archive_aux.hpp:56
libdar::comparison_fields::all
@ all
consider any available field for comparing inodes
Definition archive_aux.hpp:54
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::proto_ftp
@ proto_ftp
FTP file transfer protocol.
Definition mycurl_protocol.hpp:50
libdar::proto_sftp
@ proto_sftp
SFTP Secure FTP (over ssh)
Definition mycurl_protocol.hpp:51
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.