ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
file_operations::tmp_path Class Reference

Represents a temporary path, which is (optionally) removed by the destructor. More...

#include <filesystem.h>

Inheritance diagram for file_operations::tmp_path:
[legend]

Public Member Functions

 tmp_path ()=default
 tmp_path (std::string path, bool keep=false)
 tmp_path (const tmp_path &)=delete
 tmp_path (tmp_path &&o)
 ~tmp_path ()
tmp_path & operator= (tmp_path o)
const std::string & path () const noexcept
tmp_path & keep (bool yes) &noexcept
tmp_path && keep (bool yes) &&noexcept

Protected Attributes

bool _keep = true

Friends

void swap (tmp_path &a, tmp_path &b)

Detailed Description

Represents a temporary path, which is (optionally) removed by the destructor.

On destruction, optionally (default: yes), the path removed along with all contained paths if it points to a directory. The default ctor is provided only to ease array allocation; it does not construct valid temporary paths. As an instance of this class represents a bound resource, it cannot be copied, only moved.

Constructor & Destructor Documentation

◆ tmp_path() [1/4]

file_operations::tmp_path::tmp_path ( )
default

◆ tmp_path() [2/4]

tmp_path::tmp_path ( std::string path,
bool keep = false )

◆ tmp_path() [3/4]

file_operations::tmp_path::tmp_path ( const tmp_path & )
delete

◆ tmp_path() [4/4]

tmp_path::tmp_path ( tmp_path && o)

◆ ~tmp_path()

tmp_path::~tmp_path ( )

Member Function Documentation

◆ keep() [1/2]

tmp_path && tmp_path::keep ( bool yes) &&
noexcept

◆ keep() [2/2]

tmp_path & tmp_path::keep ( bool yes) &
noexcept

◆ operator=()

tmp_path & tmp_path::operator= ( tmp_path o)

◆ path()

const std::string & tmp_path::path ( ) const
noexcept

◆ swap

void swap ( tmp_path & a,
tmp_path & b )
friend

Member Data Documentation

◆ _keep

bool file_operations::tmp_path::_keep = true
protected

The documentation for this class was generated from the following files: