MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / ReadFile

Method ReadFile

Goldleaf/source/fs/fs_Explorer.cpp:217–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 std::vector<u8> Explorer::ReadFile(const std::string &path) {
218 const auto full_path = this->MakeFull(path);
219 const auto file_size = this->GetFileSize(full_path);
220
221 std::vector<u8> data;
222 if(file_size > 0) {
223 data.reserve(file_size);
224 this->ReadFile(full_path, 0, file_size, data.data());
225 }
226 return data;
227 }
228
229 std::vector<std::string> Explorer::ReadFileLines(const std::string &path, const u32 line_offset, const u32 line_count) {
230 std::vector<std::string> data;

Callers 15

CopyFileMethod · 0.95
CopyFileProgressMethod · 0.95
IsFileBinaryMethod · 0.95
ReadFileLinesMethod · 0.95
ReadFileFormatHexMethod · 0.95
RebootWithPayloadFunction · 0.45
PrepareInstallationMethod · 0.45
WriteContentsMethod · 0.45
GenerateFromFunction · 0.45
ReadTicketFunction · 0.45
OnFileSelectedMethod · 0.45

Calls 2

MakeFullMethod · 0.95
GetFileSizeMethod · 0.45

Tested by

no test coverage detected