| 153 | } |
| 154 | |
| 155 | buffered_file::buffered_file(cstring_view filename, cstring_view mode) { |
| 156 | FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), |
| 157 | nullptr); |
| 158 | if (!file_) |
| 159 | FMT_THROW(system_error(errno, "cannot open file {}", filename.c_str())); |
| 160 | } |
| 161 | |
| 162 | void buffered_file::close() { |
| 163 | if (!file_) return; |
nothing calls this directly
no test coverage detected