| 180 | } |
| 181 | |
| 182 | std::vector<std::string> glob_path_as_string_list(const std::filesystem::path& folder, const char* globStr, SDL_GlobFlags globFlags, const std::function<std::string(const std::filesystem::path)>& pathToStr) { |
| 183 | int globCount; |
| 184 | char** filesInPath = SDL_GlobDirectory(folder.string().c_str(), globStr, globFlags, &globCount); |
| 185 | if(!filesInPath) |
| 186 | throw std::runtime_error("[glob_path_as_string_list] SDL_GlobDirectory failed"); |
| 187 | std::vector<std::string> toRet(globCount); |
| 188 | for(int i = 0; i < globCount; i++) |
| 189 | toRet[i] = pathToStr(std::filesystem::path(filesInPath[i])); |
| 190 | return toRet; |
| 191 | } |
| 192 | |
| 193 | std::filesystem::path sdl_safe_copy_file(const std::filesystem::path& toPath, const std::filesystem::path& fileToCopy, const std::string& fileName, const std::string& fileExtension) { |
| 194 | std::vector<std::string> toFolderListNames; |
no test coverage detected