You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
falk-werner_webfuse/test-src/integration/webfuse/test/tempdir.cpp

24 lines
308 B

#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;
}
}