MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / readContents

Method readContents

TheForceEngine/TFE_FileSystem/filestream.cpp:82–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82u32 FileStream::readContents(const char* filePath, void** output)
83{
84 assert(output);
85
86 u32 size = 0;
87 FileStream file;
88 if (file.open(filePath, MODE_READ))
89 {
90 size = (u32)file.getSize();
91 *output = realloc(*output, size + 1);
92 file.readBuffer(*output, size);
93 file.close();
94 }
95 return size;
96}
97
98u32 FileStream::readContents(const char* filePath, void* output, size_t size)
99{

Callers

nothing calls this directly

Calls 4

openMethod · 0.45
getSizeMethod · 0.45
readBufferMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected