26#ifndef MYSQL_HARNESS_TEMP_DIRECTORY_INCLUDED
27#define MYSQL_HARNESS_TEMP_DIRECTORY_INCLUDED
46 std::string
file(
const std::string &fname) {
return name_ +
"/" + fname; }
Definition: temp_directory.h:33
std::string name_
Definition: temp_directory.h:49
TempDirectory(const std::string &prefix="router")
Definition: temp_directory.h:35
void reset(const std::string &name)
Definition: temp_directory.h:40
std::string name() const
Definition: temp_directory.h:44
~TempDirectory()
Definition: temp_directory.h:38
std::string file(const std::string &fname)
Definition: temp_directory.h:46
HARNESS_EXPORT std::string get_tmp_dir(const std::string &name="router")
Creates a temporary directory with partially-random name and returns its path.
Definition: filesystem-posix.cc:326
HARNESS_EXPORT stdx::expected< void, std::error_code > delete_dir_recursive(const std::string &dir) noexcept
Removes directory and all its contents.
Definition: filesystem.cc:247