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

Function writeStringToFile

src/util/file.cc:205–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205bool writeStringToFile(const std::string& data, const std::string& file_name) {
206 File* file = File::open(file_name, "w");
207 if (file == NULL) return false;
208 return (file->writeString(data) == data.size() && file->close());
209}
210
211namespace {
212class NoOpErrorCollector : public google::protobuf::io::ErrorCollector {

Callers 2

writeProtoToASCIIFileFunction · 0.85
writeProtoToFileFunction · 0.85

Calls 3

writeStringMethod · 0.80
closeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected