MLBookProc 1.0
 
Loading...
Searching...
No Matches
SelfRemovingPath Class Reference

The SelfRemovingPath class. More...

#include <SelfRemovingPath.h>

Public Member Functions

 SelfRemovingPath ()
 SelfRemovingPath constructor.
 
virtual ~SelfRemovingPath ()
 SelfRemovingPath destructor.
 
 SelfRemovingPath (const SelfRemovingPath &other)
 SelfRemovingPath copy constructor.
 
 SelfRemovingPath (SelfRemovingPath &&other)
 SelfRemovingPath move constructor.
 
SelfRemovingPathoperator= (const SelfRemovingPath &other)
 operator =
 
SelfRemovingPathoperator= (SelfRemovingPath &&other)
 operator =
 
SelfRemovingPathoperator= (const std::filesystem::path &path)
 operator =
 
 SelfRemovingPath (const std::filesystem::path &path)
 SelfRemovingPath constructor.
 

Public Attributes

std::filesystem::path path
 Path to be removed on destruction.
 

Detailed Description

The SelfRemovingPath class.

Auxiliary class. Removes underlying path on destruction, if no any copies of SelfRemovingPath object have been created. Removes path on last copy destruction otherwise.

Constructor & Destructor Documentation

◆ SelfRemovingPath()

SelfRemovingPath::SelfRemovingPath ( const std::filesystem::path & path)
explicit

SelfRemovingPath constructor.

Parameters
pathpath to be removed on destruction.

Member Function Documentation

◆ operator=()

SelfRemovingPath & SelfRemovingPath::operator= ( const std::filesystem::path & path)

operator =

Parameters
pathpath to be removed on destruction.
Returns
Returns self.