void Win32Native::FindAllFilesWithNoRecursive(const std::string& directory, const std::string& extensions, std::vector<std::string>& files) noexcept
{
WIN32_FIND_DATAA findFileData;
HANDLE hFind = FindFirstFileA((directory + "\\" + extensions).data(), &findFileData);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
if ((findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
{
std::string fileName(findFileData.cFileName);
files.emplace_back(directory + "\\" + fileName);
}
} while (FindNextFileA(hFind, &findFileData) != 0);
FindClose(hFind);
}
}