20#ifndef BEAST_UTILITY_TEMP_DIR_H_INCLUDED
21#define BEAST_UTILITY_TEMP_DIR_H_INCLUDED
23#include <boost/filesystem.hpp>
47 auto const dir = boost::filesystem::temp_directory_path();
50 path_ = dir / boost::filesystem::unique_path();
51 }
while (boost::filesystem::exists(
path_));
52 boost::filesystem::create_directory(
path_);
59 boost::system::error_code ec;
60 boost::filesystem::remove_all(
path_, ec);
68 return path_.string();
RAII temporary directory.
std::string path() const
Get the native path for the temporary directory.
boost::filesystem::path path_
temp_dir()
Construct a temporary directory.
~temp_dir()
Destroy a temporary directory.
std::string file(std::string const &name) const
Get the native path for the a file.