the mask_list class, matches string that are present in a given file
More...
#include <mask_list.hpp>
|
| mask_list (const std::string &filename_list_st, bool case_sensit, const path &prefix, bool include) |
| the constructor
|
| mask_list (const mask_list &ref)=default |
| mask_list (mask_list &&ref)=default |
mask_list & | operator= (const mask_list &ref)=default |
mask_list & | operator= (mask_list &&ref) noexcept=default |
virtual bool | is_covered (const std::string &expression) const override |
| inherited from the mask class
|
virtual mask * | clone () const override |
| inherited from the mask class
|
U_I | size () const |
| routing only necessary for doing some testing
|
virtual std::string | dump (const std::string &prefix) const override |
| output the listing content
|
| mask (const mask &ref)=default |
| mask (mask &&ref) noexcept=default |
mask & | operator= (const mask &ref)=default |
mask & | operator= (mask &&ref) noexcept=default |
virtual bool | is_covered (const path &chemin) const |
| check whether the given path is covered by the mask
|
the mask_list class, matches string that are present in a given file
the given file must contain one entry per line (thus no carriage return is allowed in a given entry). Note that the file listed in the file may have a relative path or an absolute path.
Definition at line 50 of file mask_list.hpp.
◆ mask_list()
libdar::mask_list::mask_list |
( |
const std::string & | filename_list_st, |
|
|
bool | case_sensit, |
|
|
const path & | prefix, |
|
|
bool | include ) |
the constructor
- Parameters
-
[in] | filename_list_st | is the path to the file listing the filename to select for the operation |
[in] | case_sensit | whether comparison is case sensitive or not |
[in] | prefix | add this prefix to relative paths of the list. The prefix should be either absolute, or path::FAKE_ROOT (if the operation does not involve an fs_root - testing, listing, merging operations for example) |
[in] | include | whether the mask_list is used for file inclusion or file exclusion |
- Note
- : WARNING: if "include is set to false, the mask must be negated by a not_mask(),
this is not performed here. Here the include/exclude only parameter changes the filter
internal "formula", but for historical reasons and by homogeneity with path base filtering the mask negation is done outside the mask construction. In other words, the caller should create the mask with the following statement either:
- not_mask(mask_list(<filename>, <case sensit>, <prefix>, false)) or
- mask_list(<filename>, <case sensit>, <prefix>, true)) and pass the resulting (eventually logically anded or ored with other masks to libdar set_subtree() method of an archive_option_* class.
◆ clone()
virtual mask * libdar::mask_list::clone |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ dump()
virtual std::string libdar::mask_list::dump |
( |
const std::string & | prefix | ) |
const |
|
overridevirtual |
◆ is_covered()
virtual bool libdar::mask_list::is_covered |
( |
const std::string & | expression | ) |
const |
|
overridevirtual |
◆ size()
U_I libdar::mask_list::size |
( |
| ) |
const |
|
inline |
routing only necessary for doing some testing
Definition at line 86 of file mask_list.hpp.
◆ case_s
bool libdar::mask_list::case_s |
|
private |
◆ contenu
std::deque<std::string> libdar::mask_list::contenu |
|
private |
◆ including
bool libdar::mask_list::including |
|
private |
◆ taille
U_I libdar::mask_list::taille |
|
private |
The documentation for this class was generated from the following file: