rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
beast::temp_dir Class Reference

RAII temporary directory. More...

#include <temp_dir.h>

Public Member Functions

 temp_dir ()
 Construct a temporary directory.
 
 ~temp_dir ()
 Destroy a temporary directory.
 
std::string path () const
 Get the native path for the temporary directory.
 
std::string file (std::string const &name) const
 Get the native path for the a file.
 

Private Attributes

boost::filesystem::path path_
 

Detailed Description

RAII temporary directory.

The directory and all its contents are deleted when the instance of temp_dir is destroyed.

Definition at line 15 of file temp_dir.h.

Constructor & Destructor Documentation

◆ temp_dir()

beast::temp_dir::temp_dir ( )

Construct a temporary directory.

Definition at line 27 of file temp_dir.h.

◆ ~temp_dir()

beast::temp_dir::~temp_dir ( )

Destroy a temporary directory.

Definition at line 38 of file temp_dir.h.

Member Function Documentation

◆ path()

std::string beast::temp_dir::path ( ) const

Get the native path for the temporary directory.

Definition at line 48 of file temp_dir.h.

◆ file()

std::string beast::temp_dir::file ( std::string const &  name) const

Get the native path for the a file.

The file does not need to exist.

Definition at line 58 of file temp_dir.h.

Member Data Documentation

◆ path_

boost::filesystem::path beast::temp_dir::path_
private

Definition at line 17 of file temp_dir.h.