mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
25 lines
505 B
C++
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;
|
|
}
|