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