![]() |
OpenMS
|
Class representing a temporary directory. More...
#include <OpenMS/SYSTEM/File.h>
Public Member Functions | |
| TempDir (bool keep_dir=false) | |
| TempDir (const String &base_dir, bool keep_dir=false) | |
| ~TempDir () | |
| Destroy temporary folder (can be prohibited in Constructor) | |
| TempDir (const TempDir &)=delete | |
| delete all means to copy or move a TempDir | |
| TempDir & | operator= (const TempDir &)=delete |
| TempDir (TempDir &&)=delete | |
| TempDir & | operator= (TempDir &&)=delete |
| const String & | getPath () const |
| Return path to temporary folder. | |
Private Attributes | |
| String | temp_dir_ |
| bool | keep_dir_ |
Class representing a temporary directory.
| TempDir | ( | bool | keep_dir = false | ) |
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.
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.
| 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)
| const String & getPath | ( | ) | const |
Return path to temporary folder.
|
private |
|
private |