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