MCPcopy Create free account
hub / github.com/Tencent/libpag / WriteFileToDisk

Function WriteFileToDisk

viewer/src/utils/FileUtils.cpp:86–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86bool 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
95bool WriteDataToDisk(const QString& filePath, const void* data, size_t length) {
96 FILE* fp = fopen(filePath.toStdString().c_str(), "wb");

Callers 1

saveAttributeMethod · 0.85

Calls 3

WriteDataToDiskFunction · 0.85
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected