Disk ARchive
2.7.15
Full featured and portable backup and archiving tool
|
a set of general command line targeted routines More...
#include "../my_config.h"
#include <string>
#include <vector>
#include <deque>
#include <memory>
#include "libdar.hpp"
#include "tlv_list.hpp"
#include "tools.hpp"
Go to the source code of this file.
Functions | |
void | line_tools_slice_ownership (const std::string &cmd, std::string &slice_permission, std::string &slice_user_ownership, std::string &slice_group_ownership) |
void | line_tools_repeat_param (const std::string &cmd, infinint &repeat_count, infinint &repeat_byte) |
void | line_tools_tlv_list2argv (user_interaction &dialog, tlv_list &list, argc_argv &arg) |
S_I | line_tools_reset_getopt () |
returns the old position of parsing (next argument to parse) | |
std::string::const_iterator | line_tools_find_first_char_out_of_parenth (const std::string &argument, unsigned char to_find) |
std::string::const_iterator | line_tools_find_last_char_out_of_parenth (const std::string &argument, unsigned char to_find) |
std::string | line_tools_expand_user_comment (const std::string &user_comment, S_I argc, char *const argv[]) |
std::deque< std::string > | line_tools_explode_PATH (const char *the_path) |
split a PATH environement variable string into its components (/usr/lib:/lib => /usr/lib /lib) | |
std::string | line_tools_get_full_path_from_PATH (const std::deque< std::string > &the_path, const char *filename) |
return the full path of the given filename (eventually unchanged of pointing to the first file of that name present in the_path directories | |
void | line_tools_split_at_first_space (const char *field, std::string &before_space, std::string &after_space) |
return split at the first space met the string given as first argument, and provide the two splitted string as second and third argument | |
void | line_tools_get_min_digits (std::string arg, infinint &num, infinint &ref_num, infinint &aux_num) |
void | line_tools_look_for (const std::deque< char > &arguments, S_I argc, char *const argv[], const char *getopt_string, char stop_scan, std::deque< char > &presence) |
test the presence of a set of argument on the command line More... | |
void | line_tools_look_for_Q (S_I argc, char *const argv[], const char *getopt_string, char stop_scan, bool &Q_is_present) |
test the presence of -Q and -j options on the command line More... | |
template<class T > | |
void | line_tools_split (const std::string &val, char sep, T &split) |
split a line in words given the separator character (sep) | |
std::set< std::string > | line_tools_deque_to_set (const std::deque< std::string > &list) |
void | line_tools_4_4_build_compatible_overwriting_policy (bool allow_over, bool detruire, bool more_recent, const libdar::infinint &hourshift, bool ea_erase, const libdar::crit_action *&overwrite) |
void | line_tools_crypto_split_algo_pass (const secu_string &all, crypto_algo &algo, secu_string &pass, bool &no_cipher_given, std::vector< std::string > &recipients) |
void | line_tools_display_signatories (user_interaction &ui, const std::list< signator > &gnupg_signed) |
display information about the signatories | |
void | line_tools_read_from_pipe (std::shared_ptr< user_interaction > &dialog, S_I fd, tlv_list &result) |
Extract from anonymous pipe a tlv_list. More... | |
void | line_tools_extract_basename (const char *command_name, std::string &basename) |
extracts the basename of a file (removing path part) More... | |
std::string::iterator | line_tools_find_first_char_of (std::string &s, unsigned char v) |
give a pointer to the last character of the given value in the given string More... | |
void | line_tools_split_path_basename (const char *all, path *&chemin, std::string &base) |
split a given full path in path part and basename part More... | |
void | line_tools_split_path_basename (const std::string &all, std::string &chemin, std::string &base) |
split a given full path in path part and basename part More... | |
bool | line_tools_split_entrepot_path (const std::string &all, std::string &proto, std::string &login, secu_string &password, std::string &hostname, std::string &port, std::string &path_basename) |
split a given full remote repository path in parts More... | |
S_I | line_tools_str2signed_int (const std::string &x) |
convert a signed integer written in decimal notation to the corresponding value More... | |
infinint | line_tools_convert_date (const std::string &repres) |
convert a human readable date representation in number of second since the system reference date More... | |
void | line_tools_display_features (user_interaction &dialog) |
display the compilation time features of libdar More... | |
const char * | line_tools_get_from_env (const char **env, const char *clef) |
isolate the value of a given variable from the environment vector More... | |
void | line_tools_check_basename (user_interaction &dialog, const path &loc, std::string &base, const std::string &extension, bool create) |
does sanity checks on a slice name, check presence and detect whether the given basename is not rather a filename More... | |
void | line_tools_check_min_digits (user_interaction &dialog, const path &loc, const std::string &base, const std::string &extension, infinint &num_digits) |
if a slice number 1 is met with the provided basename, set the num_digits accordingly More... | |
void | line_tools_read_range (const std::string &s, S_I &min, U_I &max) |
from a string with a range notation (min-max) extract the range values More... | |
template<class T > | |
void | line_tools_split_in_words (generic_file &f, T &mots) |
read a file and split its contents into words More... | |
template<class T > | |
void | line_tools_split_in_words (const std::string &arg, T &mots) |
read a std::string and split its contents into words More... | |
std::string | line_tools_build_regex_for_exclude_mask (const std::string &prefix, const std::string &relative_part) |
builds a regex from root directory and user provided regex to be applied to the relative path More... | |
std::string | line_tools_get_euid () |
return a string containing the Effective UID | |
std::string | line_tools_get_egid () |
return a string containing the Effective UID | |
std::string | line_tools_get_hostname () |
return a string containing the hostname of the current host | |
std::string | line_tools_get_date_utc () |
return a string containing the current time (UTC) | |
void | line_tools_merge_to_deque (std::deque< std::string > &a, const std::deque< std::string > &b) |
add in 'a', element of 'b' not already found in 'a' | |
std::deque< std::string > | line_tools_substract_from_deque (const std::deque< std::string > &a, const std::deque< std::string > &b) |
remove from 'a' elements found in 'b' and return the resulting deque | |
delta_sig_block_size::fs_function_t | line_tools_string_to_sig_block_size_function (const std::string &funname) |
converts string name to function More... | |
void | line_tools_split_compression_algo (const char *arg, U_I base, compression &algo, U_I &level, U_I &block_size) |
Variables | |
constexpr U_I | LINE_TOOLS_SI_SUFFIX = 1000 |
constexpr U_I | LINE_TOOLS_BIN_SUFFIX = 1024 |
a set of general command line targeted routines
Definition in file line_tools.hpp.