14 FilePtr fopen(
const std::filesystem::path& filename,
const std::string& mode) {
20 const std::string& mode) {
~RenamingFilePtr()
Close the file and rename it.
std::filesystem::path filename_unfinished_
Path of the unfinished file.
std::filesystem::path filename_
Path of the finished file.
FILE * get()
Get the underlying FILE* pointer.
RenamingFilePtr(const std::filesystem::path &filename, const std::string &mode)
Construct a RenamingFilePtr.
int uncaught_exceptions_
Number of uncaught exceptions at the time when the object is created.
FILE * file_
Internal file pointer.
std::unique_ptr< std::FILE, FileDeleter > FilePtr
A RAII type to replace std::FILE *.
FilePtr fopen(const std::filesystem::path &filename, const std::string &mode)
Open a file with given mode.