MCPcopy Create free account
hub / github.com/Norbyte/bg3se / LoadFile

Function LoadFile

CoreLib/Utils.cpp:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137bool LoadFile(std::wstring const& path, std::vector<uint8_t>& body)
138{
139 std::ifstream f(path, std::ios::in | std::ios::binary);
140 if (f.good()) {
141 f.seekg(0, std::ios::end);
142 auto size = f.tellg();
143 f.seekg(0, std::ios::beg);
144
145 body.resize(size);
146 f.read(reinterpret_cast<char*>(body.data()), size);
147 return f.good();
148 }
149
150 return false;
151}
152
153bool LoadFile(std::wstring const& path, std::string& body)
154{

Callers 9

SignFileMethod · 0.85
GetFileSignatureMethod · 0.85
VerifySignedFileMethod · 0.85
LoadFileMethod · 0.85
GetFileDigestFunction · 0.85
LoadManifestMethod · 0.85
LoadMethod · 0.85
LoadFileMethod · 0.85
UpdateManifestFunction · 0.85

Calls 2

resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected