Files | |
| file | deci.hpp |
| manages the decimal representation of infinint | |
Classes | |
| class | libdar::deci |
| decimal class, convert infinint from and to decimal represention More... | |
Functions | |
| std::ostream & | libdar::operator<< (std::ostream &ref, const infinint &arg) |
| specific << operator to use infinint in std::ostream | |
| char * | libdar::tools_str2charptr (std::string x) |
| convert a string to a char * | |
| void | libdar::tools_write_string (generic_file &f, const std::string &s) |
| write a string to a file with a '\0' at then end | |
| void | libdar::tools_read_string (generic_file &f, std::string &s) |
| read a string from a file expecting it to terminate by '\0' | |
| void | libdar::tools_write_string_all (generic_file &f, const std::string &s) |
| write a string to a file, '\0' has no special meaning nor is added at the end | |
| void | libdar::tools_read_string_size (generic_file &f, std::string &s, infinint taille) |
| read a string if given size from a file '\0' has no special meaning | |
| infinint | libdar::tools_get_filesize (const path &p) |
| retrieve the size in byte of a file | |
| infinint | libdar::tools_get_extended_size (std::string s, U_I base) |
| convert the given string to infinint taking care of multiplication suffixes like k, M, T, etc. | |
| char * | libdar::tools_extract_basename (const char *command_name) |
| extracts the basename of a file (removing path part) | |
| void | libdar::tools_split_path_basename (const char *all, path *&chemin, std::string &base) |
| split a given full path in path part and basename part | |
| void | libdar::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 | |
| void | libdar::tools_open_pipes (user_interaction &dialog, const std::string &input, const std::string &output, tuyau *&in, tuyau *&out) |
| open a pair of tuyau objects encapsulating two named pipes. | |
| void | libdar::tools_blocking_read (int fd, bool mode) |
| set blocking/not blocking mode for reading on a file descriptor | |
| std::string | libdar::tools_name_of_uid (U_16 uid) |
| convert uid to name in regards to the current system's configuration | |
| std::string | libdar::tools_name_of_gid (U_16 gid) |
| convert gid to name in regards of the current system's configuration | |
| std::string | libdar::tools_uword2str (U_16 x) |
| convert unsigned word to string | |
| std::string | libdar::tools_int2str (S_I x) |
| convert integer to string | |
| U_32 | libdar::tools_str2int (const std::string &x) |
| convert an integer written in decimal notation to the corresponding value | |
| std::string | libdar::tools_addspacebefore (std::string s, unsigned int expected_size) |
| prepend spaces before the given string | |
| std::string | libdar::tools_display_date (infinint date) |
| convert a date in second to its human readable representation | |
| infinint | libdar::tools_convert_date (const std::string &repres) |
| convert a human readable date representation in number of second since the system reference date | |
| void | libdar::tools_system (user_interaction &dialog, const std::vector< std::string > &argvector) |
| wrapper to the "system" system call. | |
| void | libdar::tools_write_vector (generic_file &f, const std::vector< std::string > &x) |
| write a list of string to file | |
| void | libdar::tools_read_vector (generic_file &f, std::vector< std::string > &x) |
| read a list of string from a file | |
| std::string | libdar::tools_concat_vector (const std::string &separator, const std::vector< std::string > &x) |
| concatenate a vectors of strings in a single string | |
| std::vector< std::string > | libdar::operator+ (std::vector< std::string > a, std::vector< std::string > b) |
| concatenate two vectors | |
| bool | libdar::tools_is_member (const std::string &val, const std::vector< std::string > &liste) |
| test the presence of a value in a list | |
| void | libdar::tools_display_features (user_interaction &dialog, bool ea, bool largefile, bool nodump, bool special_alloc, U_I bits, bool thread_safe, bool libz, bool libbz2, bool libcrypto) |
| display the compilation time features of libdar | |
| bool | libdar::is_equal_with_hourshift (const infinint &hourshift, const infinint &date1, const infinint &date2) |
| test if two dates are equal taking care of a integer hour of difference | |
| bool | libdar::tools_my_atoi (char *a, U_I &val) |
| ascii to integer conversion | |
| template<class T> | |
| std::vector< T > | libdar::operator+= (std::vector< T > &a, const std::vector< T > &b) |
| template function to add two vectors | |
| const char * | libdar::tools_get_from_env (const char **env, char *clef) |
| isolate the value of a given variable from the environment vector | |
| void | libdar::tools_check_basename (user_interaction &dialog, const path &loc, std::string &base, const std::string &extension) |
| does sanity checks on a slice name, check presence and detect whether the given basename is not rather a filename | |
| std::string | libdar::tools_getcwd () |
| get current working directory | |
| std::string | libdar::tools_readlink (const char *root) |
| returns the file pointed to by a symbolic link (or transparent if the file is not a symlink). | |
| bool | libdar::tools_look_for (const char *argument, S_I argc, char *argv[]) |
| test the presence of an argument | |
| void | libdar::tools_noexcept_make_date (const std::string &chem, const infinint &last_acc, const infinint &last_mod) |
| set dates of a given file, no exception thrown | |
| void | libdar::tools_make_date (const std::string &chemin, infinint access, infinint modif) |
| set dates of a given file, may throw exception | |
| bool | libdar::tools_is_case_insensitive_equal (const std::string &a, const std::string &b) |
| compare two string in case insensitive manner | |
| void | libdar::tools_to_upper (char *nts) |
| convert a string to upper case | |
| void | libdar::tools_to_upper (std::string &r) |
| convert a string to upper case | |
| void | libdar::tools_remove_last_char_if_equal_to (char c, std::string &s) |
| remove last character of a string is it equal to a given value | |
| void | libdar::tools_read_range (const std::string &s, U_I &min, U_I &max) |
| from a string with a range notation (min-max) extract the range values | |
| std::string | libdar::tools_printf (char *format,...) |
| make printf-like formating to a std::string | |
| std::string | libdar::tools_vprintf (char *format, va_list ap) |
| make printf-like formating to a std::string | |
| bool | libdar::tools_do_some_files_match_mask (user_interaction &ui, const char *c_chemin, const char *file_mask) |
| test the presence of files corresponding to a given mask in a directory | |
| void | libdar::tools_unlink_file_mask (user_interaction &dialog, const char *c_chemin, const char *file_mask, bool info_details) |
| remove files from a given directory | |
| void | libdar::tools_avoid_slice_overwriting (user_interaction &dialog, const path &chemin, const std::string &x_file_mask, bool info_details, bool allow_overwriting, bool warn_overwriting, bool dry_run) |
| prevents slice overwriting: check the presence of slice and if necessary ask the user if they can be removed | |
| void | libdar::tools_add_elastic_buffer (generic_file &f, U_32 max_size) |
| append an elastic buffer of given size to the file | |
| bool | libdar::tools_are_on_same_filesystem (const std::string &file1, const std::string &file2) |
| tells whether two files are on the same mounted filesystem | |
| path | libdar::tools_relative2absolute_path (const path &src, const path &cwd) |
| transform a relative path to an absolute one given the current directory value | |
| void | libdar::tools_block_all_signals (sigset_t &old_mask) |
| block all signals (based on POSIX sigprocmask) | |
| void | libdar::tools_set_back_blocked_signals (sigset_t old_mask) |
| unblock signals according to given mask | |
| U_I | libdar::tools_count_in_string (const std::string &s, const char a) |
| counts the number of a given char in a given string | |
| infinint | libdar::tools_get_mtime (const std::string &s) |
| returns the last modification date of the given file | |
| std::vector< std::string > | libdar::tools_split_in_words (generic_file &f) |
| read a file and split its contents in words | |
theses routines are part of the libdar API for historical reason. They are shared and used by dar, dar_slave, dar_xform, and dar_manager command. You should avoid using thoses in external program as they may be removed or changed without backward compatibility support.
|
||||||||||||||||
|
test if two dates are equal taking care of a integer hour of difference
|
|
||||||||||||
|
concatenate two vectors
|
|
||||||||||||
|
specific << operator to use infinint in std::ostream including "deci.hpp" let this operator available so you can display infinint with the << std::ostream operator as you can do for standard types. |
|
||||||||||||
|
append an elastic buffer of given size to the file
|
|
||||||||||||
|
prepend spaces before the given string
|
|
||||||||||||
|
tells whether two files are on the same mounted filesystem
|
|
||||||||||||||||||||||||||||||||
|
prevents slice overwriting: check the presence of slice and if necessary ask the user if they can be removed
|
|
|
block all signals (based on POSIX sigprocmask)
|
|
||||||||||||
|
set blocking/not blocking mode for reading on a file descriptor
|
|
||||||||||||||||||||
|
does sanity checks on a slice name, check presence and detect whether the given basename is not rather a filename
|
|
||||||||||||
|
concatenate a vectors of strings in a single string
|
|
|
convert a human readable date representation in number of second since the system reference date
|
|
||||||||||||
|
counts the number of a given char in a given string
|
|
|
convert a date in second to its human readable representation
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
display the compilation time features of libdar
|
|
||||||||||||||||
|
test the presence of files corresponding to a given mask in a directory
|
|
|
extracts the basename of a file (removing path part)
|
|
||||||||||||
|
convert the given string to infinint taking care of multiplication suffixes like k, M, T, etc.
|
|
|
retrieve the size in byte of a file
|
|
||||||||||||
|
isolate the value of a given variable from the environment vector
|
|
|
returns the last modification date of the given file
|
|
|
convert integer to string
|
|
||||||||||||
|
compare two string in case insensitive manner
|
|
||||||||||||
|
test the presence of a value in a list
|
|
||||||||||||||||
|
test the presence of an argument
|
|
||||||||||||||||
|
set dates of a given file, may throw exception
|
|
||||||||||||
|
ascii to integer conversion
|
|
|
convert gid to name in regards of the current system's configuration
|
|
|
convert uid to name in regards to the current system's configuration
|
|
||||||||||||||||
|
set dates of a given file, no exception thrown
|
|
||||||||||||||||||||||||
|
open a pair of tuyau objects encapsulating two named pipes.
|
|
||||||||||||
|
make printf-like formating to a std::string
|
|
||||||||||||||||
|
from a string with a range notation (min-max) extract the range values
|
|
||||||||||||
|
read a string from a file expecting it to terminate by '\0'
|
|
||||||||||||||||
|
read a string if given size from a file '\0' has no special meaning
|
|
||||||||||||
|
read a list of string from a file
|
|
|
returns the file pointed to by a symbolic link (or transparent if the file is not a symlink).
|
|
||||||||||||
|
transform a relative path to an absolute one given the current directory value
|
|
||||||||||||
|
remove last character of a string is it equal to a given value
|
|
|
unblock signals according to given mask
|
|
|
read a file and split its contents in words
|
|
||||||||||||||||
|
split a given full path in path part and basename part
|
|
||||||||||||||||
|
split a given full path in path part and basename part
|
|
|
convert a string to a char *
|
|
|
convert an integer written in decimal notation to the corresponding value
|
|
||||||||||||
|
wrapper to the "system" system call.
|
|
|
convert a string to upper case
|
|
|
convert a string to upper case
|
|
||||||||||||||||||||
|
remove files from a given directory
|
|
|
convert unsigned word to string
|
|
||||||||||||
|
make printf-like formating to a std::string
|
|
||||||||||||
|
write a string to a file with a '\0' at then end
|
|
||||||||||||
|
write a string to a file, '\0' has no special meaning nor is added at the end
|
|
||||||||||||
|
write a list of string to file
|
1.4.2