|
a/src/utils/pathut.h |
|
b/src/utils/pathut.h |
|
... |
|
... |
107 |
bool m_noremove;
|
107 |
bool m_noremove;
|
108 |
};
|
108 |
};
|
109 |
|
109 |
|
110 |
typedef RefCntr<TempFileInternal> TempFile;
|
110 |
typedef RefCntr<TempFileInternal> TempFile;
|
111 |
|
111 |
|
112 |
/// Temporary directory class
|
112 |
/// Temporary directory class. Recursively deleted by destructor.
|
113 |
class TempDir {
|
113 |
class TempDir {
|
114 |
public:
|
114 |
public:
|
115 |
TempDir();
|
115 |
TempDir();
|
116 |
~TempDir();
|
116 |
~TempDir();
|
117 |
const char *dirname() {return m_dirname.c_str();}
|
117 |
const char *dirname() {return m_dirname.c_str();}
|
118 |
const string &getreason() {return m_reason;}
|
118 |
const string &getreason() {return m_reason;}
|
119 |
bool ok() {return !m_dirname.empty();}
|
119 |
bool ok() {return !m_dirname.empty();}
|
|
|
120 |
/// Recursively delete contents but not self.
|
120 |
bool wipe();
|
121 |
bool wipe();
|
121 |
private:
|
122 |
private:
|
122 |
string m_dirname;
|
123 |
string m_dirname;
|
123 |
string m_reason;
|
124 |
string m_reason;
|
124 |
TempDir(const TempDir &) {}
|
125 |
TempDir(const TempDir &) {}
|