|
RADLib
RADical C++ application framework
|
RAII temporary directory with optional auto-remove. More...
#include <RADCore.h>
Public Member Functions | |
| RADTemporaryDirectory (std::string prefix="radlib") | |
| Creates a temporary directory with prefix. More... | |
| ~RADTemporaryDirectory () | |
| Removes the directory when autoRemove is enabled. More... | |
| RADTemporaryDirectory (const RADTemporaryDirectory &)=delete | |
| Temporary directories own a filesystem path and cannot be copied. More... | |
| RADTemporaryDirectory & | operator= (const RADTemporaryDirectory &)=delete |
| Temporary directories own a filesystem path and cannot be copied. More... | |
| RADTemporaryDirectory (RADTemporaryDirectory &&other) noexcept | |
| Moves ownership from other. More... | |
| RADTemporaryDirectory & | operator= (RADTemporaryDirectory &&other) noexcept |
| Moves ownership from other. More... | |
| bool | isValid () const |
| Returns true when directory creation succeeded. More... | |
| const std::string & | path () const |
| Returns the temporary directory path. More... | |
| void | setAutoRemove (bool enabled) |
| Enables or disables removal on destruction. More... | |
| bool | autoRemove () const |
| Returns true when destruction removes the directory. More... | |
| bool | remove () |
| Removes the directory immediately. More... | |
RAII temporary directory with optional auto-remove.
|
explicit |
Creates a temporary directory with prefix.
| RADCore::RADTemporaryDirectory::~RADTemporaryDirectory | ( | ) |
Removes the directory when autoRemove is enabled.
|
delete |
Temporary directories own a filesystem path and cannot be copied.
|
noexcept |
Moves ownership from other.
| bool RADCore::RADTemporaryDirectory::autoRemove | ( | ) | const |
Returns true when destruction removes the directory.
| bool RADCore::RADTemporaryDirectory::isValid | ( | ) | const |
Returns true when directory creation succeeded.
|
delete |
Temporary directories own a filesystem path and cannot be copied.
|
noexcept |
Moves ownership from other.
| const std::string& RADCore::RADTemporaryDirectory::path | ( | ) | const |
Returns the temporary directory path.
| bool RADCore::RADTemporaryDirectory::remove | ( | ) |
Removes the directory immediately.
| void RADCore::RADTemporaryDirectory::setAutoRemove | ( | bool | enabled | ) |
Enables or disables removal on destruction.