vnote/src/core/buffer/bufferprovider.cpp
Le Tan 52702a32e9 hard days for VNoteX project
Never say "refactor" again!!!
2020-11-28 23:10:43 +08:00

25 lines
505 B
C++

#include "bufferprovider.h"
#include <QFileInfo>
using namespace vnotex;
bool BufferProvider::checkFileExistsOnDisk() const
{
return QFileInfo::exists(getContentPath());
}
QDateTime BufferProvider::getLastModifiedFromFile() const
{
return QFileInfo(getContentPath()).lastModified();
}
bool BufferProvider::checkFileChangedOutside() const
{
QFileInfo info(getContentPath());
if (!info.exists() || m_lastModified != info.lastModified()) {
return true;
}
return false;
}