MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / readLinesFromFile

Function readLinesFromFile

source/util/fileutils.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#include <string>
23
24bool readLinesFromFile(BString filepath, std::vector<BString>& lines) {
25 BReadFile file;
26
27 file.open(filepath);
28 if (file.isOpen()) {
29 BString line;
30 while (file.readLine(line)) {
31 lines.push_back(line);
32 }
33 file.close();
34 return true;
35 }
36 return false;
37}
38
39bool writeLinesToFile(BString filepath, std::vector<BString>& lines) {
40 BWriteFile file;

Callers 7

initMethod · 0.85
removeMethod · 0.85
loadDefaultResourceMethod · 0.85
boxedmainFunction · 0.85
BoxedRegMethod · 0.85
ConfigFileMethod · 0.85

Calls 5

readLineMethod · 0.80
openMethod · 0.65
closeMethod · 0.65
isOpenMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected