The Battle for Wesnoth  1.19.5+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 84 of file filesystem.hpp.

Constructor & Destructor Documentation

◆ blacklist_pattern_list() [1/2]

filesystem::blacklist_pattern_list::blacklist_pattern_list ( )
inline

Definition at line 87 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 90 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 103 of file filesystem.hpp.

References directory_patterns_.

Referenced by read_ignore_patterns().

◆ add_file_pattern()

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

Definition at line 98 of file filesystem.hpp.

References file_patterns_.

Referenced by read_ignore_patterns().

◆ match_dir()

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

Definition at line 116 of file filesystem_common.cpp.

References utils::wildcard_string_match().

Referenced by archive_dir().

◆ match_file()

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

Definition at line 110 of file filesystem_common.cpp.

References utils::wildcard_string_match().

Referenced by archive_dir(), and filesystem::is_legal_file().

◆ 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 104 of file filesystem_common.cpp.

References utils::erase_if().

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 112 of file filesystem.hpp.

Referenced by add_directory_pattern().

◆ file_patterns_

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

Definition at line 111 of file filesystem.hpp.

Referenced by add_file_pattern().


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