MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / saveFile

Method saveFile

Tactility/Source/app/notes/Notes.cpp:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 }
98
99 bool saveFile(const std::string& path) {
100 // We might be writing to SD card, which could share a SPI bus with other devices (display)
101 bool result = false;
102 file::getLock(path)->withLock([&result, this, path] {
103 if (file::writeString(path, saveBuffer.c_str())) {
104 LOGGER.info("Saved to {}", path);
105 filePath = path;
106 result = true;
107 }
108 });
109 return result;
110 }
111
112#pragma endregion Open_Events_Functions
113

Callers

nothing calls this directly

Calls 4

getLockFunction · 0.85
writeStringFunction · 0.85
withLockMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected