A uniquely named temporary directory, removed when the object is destroyed.
More...
#include <OpenMS/SYSTEM/TempFiles.h>
A uniquely named temporary directory, removed when the object is destroyed.
The directory is created below SystemSettings::getTempDirectory() unless an explicit base directory is given. Destruction removes it recursively unless keep_dir was set.
◆ TempDir() [1/4]
Construct temporary folder under system temp directory If keep_dir is set to true, the folder will not be deleted on destruction of the object.
◆ TempDir() [2/4]
| TempDir |
( |
const std::string & |
base_dir, |
|
|
bool |
keep_dir = false |
|
) |
| |
Construct temporary folder under a custom base directory Creates a unique subdirectory with a generated name under base_dir. If keep_dir is set to true, the folder will not be deleted on destruction of the object.
- Parameters
-
| base_dir | The base directory under which to create the temp folder (e.g., user-specified temp path) |
| keep_dir | If true, the folder will not be deleted on destruction |
◆ ~TempDir()
Destroy temporary folder (can be prohibited in Constructor)
◆ TempDir() [3/4]
delete all means to copy or move a TempDir
◆ TempDir() [4/4]
◆ getPath()
| const std::string & getPath |
( |
| ) |
const |
Return path to temporary folder.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ keep_dir_
◆ temp_dir_