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

Temporary path to an open file with an associated FILE handle. More...

#include <filesystem.h>

Inheritance diagram for file_operations::tmp_file:
[legend]

Public Member Functions

 tmp_file ()=default
 tmp_file (FILE *f, tmp_path path)
 tmp_file (const tmp_file &)=delete
 tmp_file (tmp_file &&o)=default
 ~tmp_file ()
tmp_file & operator= (tmp_file o)
FILE * file () noexcept
Public Member Functions inherited from file_operations::tmp_path
 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

Friends

void swap (tmp_file &a, tmp_file &b)

Additional Inherited Members

Protected Attributes inherited from file_operations::tmp_path
bool _keep = true

Detailed Description

Temporary path to an open file with an associated FILE handle.

On destruction, optionally (default: yes), the file is closed and the path removed. The default ctor is provided only to ease array allocation; it does not construct valid temporary files. As an instance of this class represents a bound resource, it cannot be copied, only moved.

Constructor & Destructor Documentation

◆ tmp_file() [1/4]

file_operations::tmp_file::tmp_file ( )
default

◆ tmp_file() [2/4]

tmp_file::tmp_file ( FILE * f,
tmp_path path )

◆ tmp_file() [3/4]

file_operations::tmp_file::tmp_file ( const tmp_file & )
delete

◆ tmp_file() [4/4]

file_operations::tmp_file::tmp_file ( tmp_file && o)
default

◆ ~tmp_file()

tmp_file::~tmp_file ( )

Member Function Documentation

◆ file()

FILE * tmp_file::file ( )
noexcept

◆ operator=()

tmp_file & tmp_file::operator= ( tmp_file o)

◆ swap

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

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