| 96 | } |
| 97 | |
| 98 | static std::string cachePath(Context& context) { |
| 99 | char buf[4096]; |
| 100 | context.environment->GetPath(PathType::Data, buf, sizeof(buf)); |
| 101 | std::string path = std::string(buf) + "/cache/transcoder/"; |
| 102 | fs::path fsPath(fs::u8path(path)); |
| 103 | if (!fs::exists(fsPath)) { |
| 104 | fs::create_directories(fsPath); |
| 105 | } |
| 106 | return path; |
| 107 | } |
| 108 | |
| 109 | static void iterateTranscodeCache(Context& context, std::function<void(fs::path)> cb) { |
| 110 | if (cb) { |
no test coverage detected