|
BuildCache
|
A helper class for handling temporary files and directories. More...
#include <file_utils.hpp>
Public Member Functions | |
| tmp_file_t (const std::string &dir, const std::string &extension) | |
| Construct a temporary file name. More... | |
| ~tmp_file_t () | |
| Remove the temporary file or directory (if any). | |
| const std::string & | path () const |
Private Attributes | |
| std::string | m_path |
A helper class for handling temporary files and directories.
When the temp file object is created, a temporary file name is generated. Once the object goes out of scope, it removes the file or directory from disk.
| bcache::file::tmp_file_t::tmp_file_t | ( | const std::string & | dir, |
| const std::string & | extension | ||
| ) |
Construct a temporary file name.
| dir | The base directory in which the temporary file will be located. |
| extension | The file name extension (including the leading dot). |
1.8.17