C++17 header only wrapper to glob() function.
Does not work on Windows.
#include <peelo/glob.hpp>
#include <iostream>
int
main(int argc, char** argv)
{
std::vector<std::filesystem::path> results;
// The functions returns `true` if the globbing was successful, `false`
// otherwise.
if (peelo::glob("*.cpp", results))
{
// The vector given as argument now contains `std::filesystem::path`
// objects that are matches of the glob.
for (const auto& path : results)
{
std::cout << path << std::endl;
}
}
return 0;
}