Manager class for temporary directories. Whenever a new TemporaryDirectory object is constructed, a temporary directory is created. The directory is deleted when the object is deleted or goes out of scope. Note: no symbolic links are allowed inside the temporary directory.
More...
#include <filesystem.h>
|
std::string | path |
| Full path of the temporary directory. More...
|
|
Manager class for temporary directories. Whenever a new TemporaryDirectory object is constructed, a temporary directory is created. The directory is deleted when the object is deleted or goes out of scope. Note: no symbolic links are allowed inside the temporary directory.
Usage example:
void foo() {
std::ofstream of(tempdir.
path +
"/my_file.txt");
}
dmlc::TemporaryDirectory::TemporaryDirectory |
( |
bool |
verbose = false | ) |
|
|
inlineexplicit |
Default constructor. Creates a new temporary directory with a unique name.
- Parameters
-
verbose | whether to emit extra messages |
dmlc::TemporaryDirectory::~TemporaryDirectory |
( |
| ) |
|
|
inline |
Destructor. Will perform recursive deletion via RecursiveDelete()
std::string dmlc::TemporaryDirectory::path |
Full path of the temporary directory.
The documentation for this class was generated from the following file: