| 12 | namespace |
| 13 | { |
| 14 | bool hasWriteAccess(std::filesystem::path const& path) |
| 15 | { |
| 16 | std::filesystem::path tempFilePath = path / "temp_test_file.tmp"; |
| 17 | |
| 18 | std::ofstream testFile(tempFilePath); |
| 19 | if (testFile) { |
| 20 | testFile.close(); |
| 21 | std::filesystem::remove(tempFilePath); |
| 22 | return true; |
| 23 | } else { |
| 24 | return false; |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | auto SavepointTableService::loadFromFile(std::string const& filename) -> std::variant<SavepointTable, Error> |