MCPcopy Create free account
hub / github.com/Illation/ETEngine / GetEntryData

Method GetEntryData

Engine/source/EtCore/FileSystem/Package/MemoryPackage.cpp:59–71  ·  view source on GitHub ↗

--------------------------------- MemoryPackage::GetEntryData This makes a copy of the data stored in the entry pointer

Source from the content-addressed store, hash-verified

57// This makes a copy of the data stored in the entry pointer
58//
59bool MemoryPackage::GetEntryData(HashString const id, std::vector<uint8>& outData)
60{
61 // try getting the file
62 PackageEntry const* pkgEntry = GetEntry(id);
63 if (pkgEntry == nullptr)
64 {
65 return false;
66 }
67
68 // return the content of the file
69 outData = std::move(std::vector<uint8>(pkgEntry->content, pkgEntry->content + pkgEntry->size));
70 return true;
71}
72
73//---------------------------------
74// MemoryPackage::InitFileListFromData

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected