MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / fillFilesList

Function fillFilesList

source/utils/Helper.cpp:123–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 bool fillFilesList(const std::string& path,
124 std::vector<std::string>& listFiles,
125 const std::string& fileExtension)
126 {
127 const boost::filesystem::path dir_path(path);
128 if (!boost::filesystem::exists(dir_path))
129 return false;
130 boost::filesystem::directory_iterator end_itr;
131 for (boost::filesystem::directory_iterator itr(dir_path); itr != end_itr; ++itr)
132 {
133 if(!boost::filesystem::is_directory(itr->status()))
134 {
135 if(itr->path().filename().extension().string() == fileExtension)
136 {
137 boost::filesystem::path p = boost::filesystem::canonical(itr->path());
138 listFiles.push_back(p.string());
139 }
140 }
141 }
142 return true;
143 }
144
145 bool fillFileStemsList(const std::string& path,
146 std::vector<std::string>& listFiles,

Callers 6

readSoundsMethod · 0.85
updateFilesListMethod · 0.85
activateMethod · 0.85
updateFilesListMethod · 0.85
updateFilesListMethod · 0.85
activateMethod · 0.85

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected