Added TempFile::exists()
This commit is contained in:
parent
ca5edb48db
commit
74cb9eaf2d
@ -19,11 +19,15 @@ TempFile::TempFile(bool create)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TempFile::~TempFile() {
|
TempFile::~TempFile() {
|
||||||
if (bf::exists(_path)) {
|
if (exists()) {
|
||||||
bf::remove(_path);
|
bf::remove(_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TempFile::exists() const {
|
||||||
|
return bf::exists(_path);
|
||||||
|
}
|
||||||
|
|
||||||
const bf::path &TempFile::path() const {
|
const bf::path &TempFile::path() const {
|
||||||
return _path;
|
return _path;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ public:
|
|||||||
explicit TempFile(bool create = true);
|
explicit TempFile(bool create = true);
|
||||||
virtual ~TempFile();
|
virtual ~TempFile();
|
||||||
const boost::filesystem::path &path() const;
|
const boost::filesystem::path &path() const;
|
||||||
|
bool exists() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const boost::filesystem::path _path;
|
const boost::filesystem::path _path;
|
||||||
|
Loading…
Reference in New Issue
Block a user