| 50 | } |
| 51 | |
| 52 | std::optional<std::string> generateTempFilePath( |
| 53 | const char* basePath, |
| 54 | const char* prefix) { |
| 55 | auto path = fmt::format("{}/bolt_{}_XXXXXX", basePath, prefix); |
| 56 | auto fd = mkstemp(path.data()); |
| 57 | if (fd == -1) { |
| 58 | return std::nullopt; |
| 59 | } |
| 60 | return path; |
| 61 | } |
| 62 | |
| 63 | std::optional<std::string> generateTempFolderPath( |
| 64 | const char* basePath, |