| 169 | } |
| 170 | |
| 171 | void close() |
| 172 | { |
| 173 | if (fd == -1) |
| 174 | return; |
| 175 | |
| 176 | if (0 != ::close(fd)) |
| 177 | throw std::runtime_error(fmt::format("Cannot close temporary file {}: {}", path, errnoToString())); |
| 178 | fd = -1; |
| 179 | } |
| 180 | |
| 181 | void write(const std::string & data) |
| 182 | { |
no test coverage detected