|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
RAII temporary file with automatic cleanup. More...
#include <TempFile.hpp>
Public Member Functions | |
| TempFile (std::string const &suffix=".json") | |
| TempFile (TempFile &&other) noexcept | |
| TempFile (TempFile const &)=delete | |
| ~TempFile () | |
| void | clear () const |
| Remove the file so the path can be used as a fresh output target. | |
| TempFile & | operator= (TempFile &&other) noexcept |
| TempFile & | operator= (TempFile const &)=delete |
| std::string const & | path () const |
| std::string | read () const |
| Read the entire file contents as a string. | |
RAII temporary file with automatic cleanup.
Creates a unique temporary file on construction and deletes it in the destructor. Provides helpers to read content back or clear() the file so the path can be used as a fresh output target.
|
inline |
|
inline |
|
delete |
|
inlinenoexcept |
|
inline |
Remove the file so the path can be used as a fresh output target.
|
inline |
|
inline |
Read the entire file contents as a string.