20 const std::string& mode) {
~RenamingFilePtr()
Close the file and rename it.
RenamingFilePtr(const bf::path &filename, const std::string &mode)
Construct a RenamingFilePtr.
FILE * get()
Get the underlying FILE* pointer.
bf::path filename_unfinished_
Path of the unfinished file.
bf::path filename_
Path of the finished file.
FILE * file_
Internal file pointer.
FilePtr fopen(const bf::path &filename, const std::string &mode)
Open a file with given mode.
std::unique_ptr< std::FILE, FileDeleter > FilePtr
A RAII type to replace std::FILE *.