MCPcopy Create free account
hub / github.com/comaps/comaps / Save

Method Save

libs/editor/editor_storage.cpp:26–34  ·  view source on GitHub ↗

StorageLocal ------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

24{
25// StorageLocal ------------------------------------------------------------------------------------
26bool LocalStorage::Save(xml_document const & doc)
27{
28 auto const editorFilePath = GetEditorFilePath();
29
30 std::lock_guard<std::mutex> guard(m_mutex);
31
32 return base::WriteToTempAndRenameToFile(editorFilePath, [&doc](std::string const & fileName)
33 { return doc.save_file(fileName.data(), " " /* indent */); });
34}
35
36bool LocalStorage::Load(xml_document & doc)
37{

Callers

nothing calls this directly

Calls 4

GetEditorFilePathFunction · 0.85
dataMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected