OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::TempFile Class Reference

#include <tempfile.hpp>

Collaboration diagram for openvpn::TempFile:
[legend]

Public Member Functions

 OPENVPN_EXCEPTION (tempfile_exception)
 
 TempFile (const std::string &fn_template, const bool fn_delete)
 
 ~TempFile ()
 
void reset ()
 
void truncate ()
 
void write (const std::string &content)
 
std::string read ()
 
std::string filename () const
 
void close_file ()
 
void set_delete (const bool del_flag)
 
void delete_file ()
 

Public Attributes

ScopedFD fd
 

Private Attributes

std::unique_ptr< char[]> fn
 
bool del
 

Detailed Description

Definition at line 40 of file tempfile.hpp.

Constructor & Destructor Documentation

◆ TempFile()

openvpn::TempFile::TempFile ( const std::string &  fn_template,
const bool  fn_delete 
)
inline

Definition at line 45 of file tempfile.hpp.

◆ ~TempFile()

openvpn::TempFile::~TempFile ( )
inline

Definition at line 73 of file tempfile.hpp.

Member Function Documentation

◆ close_file()

void openvpn::TempFile::close_file ( )
inline

Definition at line 129 of file tempfile.hpp.

◆ delete_file()

void openvpn::TempFile::delete_file ( )
inline

Definition at line 143 of file tempfile.hpp.

Here is the caller graph for this function:

◆ filename()

std::string openvpn::TempFile::filename ( ) const
inline

Definition at line 121 of file tempfile.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

openvpn::TempFile::OPENVPN_EXCEPTION ( tempfile_exception  )

◆ read()

std::string openvpn::TempFile::read ( )
inline

Definition at line 115 of file tempfile.hpp.

Here is the caller graph for this function:

◆ reset()

void openvpn::TempFile::reset ( )
inline

Definition at line 79 of file tempfile.hpp.

Here is the caller graph for this function:

◆ set_delete()

void openvpn::TempFile::set_delete ( const bool  del_flag)
inline

Definition at line 138 of file tempfile.hpp.

◆ truncate()

void openvpn::TempFile::truncate ( )
inline

Definition at line 91 of file tempfile.hpp.

Here is the caller graph for this function:

◆ write()

void openvpn::TempFile::write ( const std::string &  content)
inline

Definition at line 101 of file tempfile.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ del

bool openvpn::TempFile::del
private

Definition at line 156 of file tempfile.hpp.

◆ fd

ScopedFD openvpn::TempFile::fd

Definition at line 152 of file tempfile.hpp.

◆ fn

std::unique_ptr<char[]> openvpn::TempFile::fn
private

Definition at line 155 of file tempfile.hpp.


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