MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / SaveToFile

Method SaveToFile

libi2pd/RouterInfo.cpp:621–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619 }
620
621 bool RouterInfo::SaveToFile (const std::string& fullPath, std::shared_ptr<Buffer> buf)
622 {
623 if (!buf) return false;
624 std::ofstream f (fullPath, std::ofstream::binary | std::ofstream::out);
625 if (!f.is_open ())
626 {
627 LogPrint (eLogError, "RouterInfo: Can't save to ", fullPath);
628 return false;
629 }
630 f.write ((char *)buf->data (), buf->GetBufferLen ());
631 return true;
632 }
633
634 bool RouterInfo::SaveToFile (const std::string& fullPath)
635 {

Callers

nothing calls this directly

Calls 3

LogPrintFunction · 0.85
writeMethod · 0.80
GetBufferLenMethod · 0.45

Tested by

no test coverage detected