mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
24 lines
308 B
C++
24 lines
308 B
C++
#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()
|
|
{
|
|
rmdir(path.c_str());
|
|
}
|
|
|
|
std::string const & tempdir::name() const
|
|
{
|
|
return path;
|
|
}
|
|
|
|
}
|