The Battle for Wesnoth  1.17.12+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 ( )

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 

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)

Definition at line 79 of file filesystem.hpp.

Referenced by read_ignore_patterns().

◆ add_file_pattern()

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

Definition at line 74 of file filesystem.hpp.

Referenced by read_ignore_patterns().

◆ match_dir()

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

◆ match_file()

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

◆ 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 106 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_

Definition at line 88 of file filesystem.hpp.

Referenced by match_dir().

◆ file_patterns_

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

Definition at line 87 of file filesystem.hpp.

Referenced by match_file().

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