MCPcopy Create free account
hub / github.com/dmlc/parameter_server / readFileToString

Function readFileToString

src/util/file.cc:198–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196/////////////////////////////////////////
197
198bool readFileToString(const std::string& file_name, std::string* output) {
199 File* file = File::open(file_name, "r");
200 if (file == NULL) return false;
201 size_t size = file->size();
202 return (size <= file->readToString(output, size*100));
203}
204
205bool writeStringToFile(const std::string& data, const std::string& file_name) {
206 File* file = File::open(file_name, "w");

Callers 1

startMethod · 0.85

Calls 2

readToStringMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected