master
Avril 5 years ago
parent 3f568538bf
commit 550d211aa1
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -138,15 +138,22 @@ const unsigned char* get_data(int i)
template<typename Path>
struct DirTree
{
bool clean=true;
const Path path;
DirTree(const Path input): path(input)
DirTree(const Path input) noexcept : path(input)
{
fs::create_directory(input);
fs::create_directory(path);
}
DirTree(DirTree&& other) noexcept : path(other.path)
{
other.clean=false;
}
DirTree(const DirTree& _) noexcept = delete;
~DirTree()
{
fs::remove_all(path);
if(clean)
fs::remove_all(path);
}
const Path& operator &()

Loading…
Cancel
Save