34 const std::string &folder_path,
35 const std::string &wildcard_pattern) {
36 fs::path root(folder_path);
37 if (!fs::exists(root) || !fs::is_directory(root)) {
38 throw_exception(std::invalid_argument(folder_path +
": no such folder"));
41 std::vector<std::string> results;
42 fs::directory_iterator end;
43 for (fs::directory_iterator it(root); it != end; ++it) {
44 if (fs::is_regular_file(*it)) {
45 const std::string filename = it->path().filename().string();
47 results.emplace_back(filename);