ALPSCore reference
|
Resource manager: manages a file with unique name. More...
#include <unique_file.hpp>
Public Types | |
enum | action_type { REMOVE_AFTER, KEEP_AFTER, REMOVE_NOW, REMOVE_AND_DISOWN } |
Public Member Functions | |
unique_file (const std::string &prefix, action_type action=KEEP_AFTER) | |
Generates a random file name with a given prefix. More... | |
const std::string & | name () const |
Returns temporary file name. More... | |
~unique_file () | |
Closes and optionally deletes the file. More... | |
Resource manager: manages a file with unique name.
Definition at line 17 of file unique_file.hpp.
Definition at line 19 of file unique_file.hpp.
|
explicit |
Generates a random file name with a given prefix.
prefix | The file prefix |
action | Whether to delete file in dtor |
Definition at line 27 of file unique_file.cpp.
alps::testing::unique_file::~unique_file | ( | ) |
Closes and optionally deletes the file.
Definition at line 44 of file unique_file.cpp.
|
inline |
Returns temporary file name.
Definition at line 38 of file unique_file.hpp.