| 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 | { |
nothing calls this directly
no test coverage detected