The directory, and its temporary files, will be deleted when the TempDir's destructor is invoked. So to keep the files around, keep the TempDir as a field in your object.
Public Member Functions | |
TempDir (const std::string &dir="") | |
If dir is empty, a new subdirectory underneath OS::getTempDir() is created and used. | |
virtual | ~TempDir () |
The temporary directory and its files are deleted here. | |
const std::string & | getDir () const |
Protected Attributes | |
const std::string | _dir |
code::TempDir::TempDir | ( | const std::string & | dir = "" |
) |
If dir is empty, a new subdirectory underneath OS::getTempDir() is created and used.
virtual code::TempDir::~TempDir | ( | ) | [virtual] |
The temporary directory and its files are deleted here.
const std::string& code::TempDir::getDir | ( | ) | const |
const std::string code::TempDir::_dir [protected] |