MCPcopy Create free account
hub / github.com/ddnet/ddnet / ReadFile

Method ReadFile

src/engine/shared/storage.cpp:601–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599 }
600
601 bool ReadFile(const char *pFilename, int Type, void **ppResult, unsigned *pResultLen) override
602 {
603 IOHANDLE File = OpenFile(pFilename, IOFLAG_READ, Type);
604 if(!File)
605 {
606 *ppResult = nullptr;
607 *pResultLen = 0;
608 return false;
609 }
610 const bool ReadSuccess = io_read_all(File, ppResult, pResultLen);
611 io_close(File);
612 if(!ReadSuccess)
613 {
614 *ppResult = nullptr;
615 *pResultLen = 0;
616 return false;
617 }
618 return true;
619 }
620
621 char *ReadFileStr(const char *pFilename, int Type) override
622 {

Callers 14

RunMethod · 0.80
LoadSkinMethod · 0.80
AddSoundMethod · 0.80
ReplaceSoundMethod · 0.80
LoadMethod · 0.80
CreateEmptyMapFunction · 0.80
LoadFontsMethod · 0.80
ParseUpdateMethod · 0.80
LoadDDNetInfoJsonMethod · 0.80
LoadOpusMethod · 0.80
LoadWVMethod · 0.80

Calls 2

io_read_allFunction · 0.85
io_closeFunction · 0.85

Tested by

no test coverage detected