| 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, |
no test coverage detected