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

Method Load

src/base/File.cpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57std::shared_ptr<File> File::Load(const std::string& filePath) {
58 auto byteData = ByteData::FromPath(filePath);
59 if (byteData == nullptr) {
60 return nullptr;
61 }
62 return pag::File::Load(byteData->data(), byteData->length(), filePath);
63}
64
65std::shared_ptr<File> File::Load(const void* bytes, size_t length, const std::string& filePath) {
66 auto file = FindFileByPath(filePath);

Callers

nothing calls this directly

Calls 5

FromPathFunction · 0.85
FindFileByPathFunction · 0.85
insertMethod · 0.80
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected