teqp 0.22.0
Loading...
Searching...
No Matches
filesystem.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4
5namespace teqp {
9 static auto get_files_in_folder(const std::string& folder, const std::string& extension)
10 {
11 std::vector<std::filesystem::path> files;
12 for (auto const& dir_entry : std::filesystem::directory_iterator{ folder }) {
13 auto path = dir_entry.path();
14 if (path.extension() == extension) {
15 files.push_back(path);
16 }
17 }
18 return files;
19 }
20}; // namespace teqp