| 24 | |
| 25 | #ifdef __WIN32 |
| 26 | std::vector<std::string> getFileNamesFromFolder(const std::string& folderName) |
| 27 | { |
| 28 | std::vector<std::string> fileNames; |
| 29 | std::string searchFor (folderName + "/*.*"); |
| 30 | WIN32_FIND_DATA findData; |
| 31 | auto hFind = ::FindFirstFile(searchFor.c_str(), &findData); |
| 32 | |
| 33 | if (hFind != INVALID_HANDLE_VALUE) |
| 34 | { |
| 35 | do |
| 36 | { |
| 37 | if(!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) |
| 38 | { |
| 39 | fileNames.push_back(findData.cFileName); |
| 40 | } |
| 41 | |
| 42 | } while (::FindNextFile(hFind, &findData)); |
| 43 | } |
| 44 | |
| 45 | return fileNames; |
| 46 | } |
| 47 | /* |
| 48 | ///@TODO Linux/ etc of this |
| 49 | std::vector<std::string> getFolderNamesFromFolder(const std::string& folderName) |
no outgoing calls
no test coverage detected