#include "Directory.h"

std::vector<Path> Directory::getFilesWithExtension(const Path& path, const std::string& extension)
{
    std::vector<Path> paths;
    if (std::filesystem::is_directory(path))
    {
        for (const auto& entry : std::filesystem::directory_iterator(path))
        {
            if (std::filesystem::is_regular_file(entry) && entry.path().extension() == extension)
            {
                paths.push_back(entry.path());
            }
        }
    }
    return paths;
}
