The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Attributes | List of all members
filesystem::blacklist_pattern_list Class Reference

#include <filesystem.hpp>

Public Member Functions

 blacklist_pattern_list ()
 
 blacklist_pattern_list (const std::vector< std::string > &file_patterns, const std::vector< std::string > &directory_patterns)
 
bool match_file (const std::string &name) const
 
bool match_dir (const std::string &name) const
 
void add_file_pattern (const std::string &pattern)
 
void add_directory_pattern (const std::string &pattern)
 
void remove_blacklisted_files_and_dirs (std::vector< std::string > &files, std::vector< std::string > &directories) const
 

Private Attributes

std::vector< std::string > file_patterns_
 
std::vector< std::string > directory_patterns_
 

Detailed Description

Definition at line 60 of file filesystem.hpp.

Constructor & Destructor Documentation

◆ blacklist_pattern_list() [1/2]

filesystem::blacklist_pattern_list::blacklist_pattern_list ( )
inline

Definition at line 63 of file filesystem.hpp.

◆ blacklist_pattern_list() [2/2]

filesystem::blacklist_pattern_list::blacklist_pattern_list ( const std::vector< std::string > &  file_patterns,
const std::vector< std::string > &  directory_patterns 
)
inline

Definition at line 66 of file filesystem.hpp.

Member Function Documentation

◆ add_directory_pattern()

void filesystem::blacklist_pattern_list::add_directory_pattern ( const std::string &  pattern)
inline

Definition at line 87 of file filesystem.hpp.

Referenced by read_ignore_patterns().

◆ add_file_pattern()

void filesystem::blacklist_pattern_list::add_file_pattern ( const std::string &  pattern)
inline

Definition at line 82 of file filesystem.hpp.

Referenced by read_ignore_patterns().

◆ match_dir()

bool filesystem::blacklist_pattern_list::match_dir ( const std::string &  name) const
inline

◆ match_file()

bool filesystem::blacklist_pattern_list::match_file ( const std::string &  name) const
inline

◆ remove_blacklisted_files_and_dirs()

void filesystem::blacklist_pattern_list::remove_blacklisted_files_and_dirs ( std::vector< std::string > &  files,
std::vector< std::string > &  directories 
) const

Definition at line 32 of file filesystem_common.cpp.

References match_dir(), and match_file().

Referenced by lua_fileops::intf_read_file().

Member Data Documentation

◆ directory_patterns_

std::vector<std::string> filesystem::blacklist_pattern_list::directory_patterns_
private

Definition at line 96 of file filesystem.hpp.

◆ file_patterns_

std::vector<std::string> filesystem::blacklist_pattern_list::file_patterns_
private

Definition at line 95 of file filesystem.hpp.


The documentation for this class was generated from the following files: