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.
23 lines
308 B
23 lines
308 B
2 years ago
|
#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()
|
||
|
{
|
||
|
unlink(path.c_str());
|
||
|
}
|
||
|
|
||
2 years ago
|
std::string const & tempdir::name() const
|
||
2 years ago
|
{
|
||
|
return path;
|
||
|
}
|
||
|
|
||
|
}
|