| 84 | } |
| 85 | |
| 86 | bool WriteFileToDisk(const std::shared_ptr<File>& file, const QString& filePath) { |
| 87 | auto encodeByteData = pag::Codec::Encode(file); |
| 88 | if (encodeByteData == nullptr) { |
| 89 | return false; |
| 90 | } |
| 91 | |
| 92 | return WriteDataToDisk(filePath, encodeByteData->data(), encodeByteData->length()); |
| 93 | } |
| 94 | |
| 95 | bool WriteDataToDisk(const QString& filePath, const void* data, size_t length) { |
| 96 | FILE* fp = fopen(filePath.toStdString().c_str(), "wb"); |
no test coverage detected