| 107 | } |
| 108 | |
| 109 | static void iterateTranscodeCache(Context& context, std::function<void(fs::path)> cb) { |
| 110 | if (cb) { |
| 111 | fs::directory_iterator end; |
| 112 | fs::directory_iterator file(fs::u8path(cachePath(context))); |
| 113 | while (file != end) { |
| 114 | if (!is_directory(file->status())) { |
| 115 | cb(file->path()); |
| 116 | } |
| 117 | ++file; |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | void Transcoder::RemoveTempTranscodeFiles(Context& context) { |
| 123 | iterateTranscodeCache(context, [](fs::path p) { |
no test coverage detected