1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/test-src/integration/webfuse/test/tempdir.cpp

23 lines
307 B
C++
Raw Normal View History

2022-12-30 18:43:45 +00:00
#include "webfuse/test/tempdir.hpp"
#include <unistd.h>
namespace webfuse
{
tempdir::tempdir()
{
char path_template[] = "/tmp/webfuse_test_XXXXXX";
path = mkdtemp(path_template);
}
tempdir::~tempdir()
{
2023-01-03 20:38:22 +00:00
rmdir(path.c_str());
2022-12-30 18:43:45 +00:00
}
2022-12-31 19:41:45 +00:00
std::string const & tempdir::name() const
2022-12-30 18:43:45 +00:00
{
return path;
}
}