CernVM-FS
2.12.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
raii_temp_dir.cc
Go to the documentation of this file.
1
5
#include "
raii_temp_dir.h
"
6
7
#include "
util/posix.h
"
8
9
RaiiTempDir
*
RaiiTempDir::Create
(
const
std::string& prefix) {
10
RaiiTempDir
* tmp =
new
RaiiTempDir
(prefix);
11
if
(tmp->
dir
() !=
""
) {
12
return
tmp;
13
}
else
{
14
delete
tmp;
15
return
NULL;
16
}
17
}
18
19
RaiiTempDir::RaiiTempDir
(
const
std::string& prefix)
20
: dir_(
CreateTempDir
(prefix)) {}
21
22
RaiiTempDir::~RaiiTempDir
() {
RemoveTree
(
dir_
); }
raii_temp_dir.h
RaiiTempDir::RaiiTempDir
RaiiTempDir(const std::string &prefix)
Definition:
raii_temp_dir.cc:19
RaiiTempDir::dir_
std::string dir_
Definition:
raii_temp_dir.h:32
RaiiTempDir::Create
static RaiiTempDir * Create(const std::string &prefix)
Definition:
raii_temp_dir.cc:9
CreateTempDir
std::string CreateTempDir(const std::string &path_prefix)
Definition:
posix.cc:1058
RemoveTree
bool RemoveTree(const std::string &path)
Definition:
posix.cc:1106
RaiiTempDir::~RaiiTempDir
~RaiiTempDir()
Definition:
raii_temp_dir.cc:22
RaiiTempDir::dir
std::string dir() const
Definition:
raii_temp_dir.h:25
posix.h
RaiiTempDir
Definition:
raii_temp_dir.h:21
cvmfs
cvmfs
util
raii_temp_dir.cc
Generated on Sun Sep 15 2024 00:18:14 for CernVM-FS by
1.8.5