40 #include "../my_config.h" 67 #define TOOLS_SI_SUFFIX 1000 68 #define TOOLS_BIN_SUFFIX 1024 177 extern void tools_split_path_basename(
const std::string &all, std::string & chemin, std::string & base, memory_pool *pool =
nullptr);
189 const std::string &input,
190 const std::string & output,
193 memory_pool *pool =
nullptr);
224 extern std::string tools_uint2str(U_I x);
271 extern void tools_system(user_interaction & dialog,
const std::vector<std::string> & argvector);
282 const std::string & dar_cmd,
283 const std::vector<std::string> & argvpipe,
284 memory_pool *pool =
nullptr);
304 const std::vector<std::string> & x);
311 std::vector<std::string> operator + (std::vector<std::string> a, std::vector<std::string> b);
332 template <
class T> std::vector<T>
operator +=(std::vector<T> & a,
const std::vector<T> & b)
358 const std::string & extension,
359 memory_pool *pool =
nullptr);
379 extern bool tools_look_for(
const char *argument, S_I argc,
char *
const argv[]);
389 extern void tools_noexcept_make_date(
const std::string & chem,
bool symlink,
const datetime & last_acc,
const datetime & last_mod,
const datetime & birth);
399 extern void tools_make_date(
const std::string & chemin,
bool symlink,
const datetime & access,
const datetime & modif,
const datetime & birth);
414 extern void tools_to_upper(
const std::string & r, std::string & uppered);
417 extern void tools_to_wupper(std::wstring & r);
455 extern std::string
tools_printf(
const char *format, ...);
467 extern std::string
tools_vprintf(
const char *format, va_list ap);
501 const std::string & basename,
502 const std::string & extension,
504 bool allow_overwriting,
505 bool warn_overwriting,
578 const std::string & s,
629 const std::map<char, std::string> & corres);
644 const std::string &
path,
645 const std::string & basename,
646 const std::string & num,
647 const std::string & padded_num,
648 const std::string & ext,
649 const std::string & context);
657 const std::string & cmd_line);
671 const std::string & hook,
672 const std::string & path,
673 const std::string & basename,
674 const std::string & num,
675 const std::string & padded_num,
676 const std::string & ext,
677 const std::string & context);
686 const std::string & relative_part);
744 extern void tools_set_ownership(S_I filedesc,
const std::string & slice_user,
const std::string & slice_group);
752 extern void tools_memxor(
void *dest,
const void *src, U_I n);
794 throw Erange(
"tools_number_decoupe_in_big_endian",
"base must be strictly positive");
798 ret.push_back(number % base);
843 extern std::string tools_gpgme_strerror_r(gpgme_error_t err);
848 extern std::wstring tools_string_to_wstring(
const std::string & val);
852 extern std::string tools_wstring_to_string(
const std::wstring & val);
859 extern std::vector<std::string>
tools_substract_from_vector(
const std::vector<std::string> & a,
const std::vector<std::string> & b);
882 template <
class T> T tools_max(T a, T b) {
return a > b ? a : b; }
883 template <
class T> T tools_min(T a, T b) {
return a > b ? b : a; }
904 const char *inode_path,
913 std::string msg =
tools_printf(gettext(
"Found negative date (%s) for inode %s ."),
917 ui.
pause(
tools_printf(gettext(
"%S Can we read it as if it was zero (1st January 1970 at 00:00:00 UTC)?"),
920 ui.
warning(msg + gettext(
"Considering date as if it was zero (Jan 1970)"));
void warning(const std::string &message)
method used to display a warning or a message to the user.
are defined here basic integer types that tend to be portable
class memory_pool allocates and recycles blocks of memory for better performances it is expected to b...
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
This is a pure virtual class that is used by libdar when interaction with the user is required...
virtual void pause(const std::string &message)
method used to ask a boolean question to the user.
here is the definition of the path classthe path class handle path and provide several operation on t...
defines the implementation of pipe under the generic_file interface.mainly used between zapette and s...
switch module to limitint (32 ou 64 bits integers) or infinint
exception used to signal range error
this file contains the definition of class datetime that stores unix times in a portable way ...
this is the interface class from which all other data transfer classes inherit
List of Generic Type Length Value data structures.
the arbitrary large positive integer class
libdar namespace encapsulate all libdar symbols
the class path is here to manipulate paths in the Unix notation: using'/'