forked from qt-creator/qt-creator
Utils: Introduce FilePath::fileSize()
And implement it locally and for docker. Change-Id: I362f4cae95560836d9300473a286429eb4569329 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1279,6 +1279,15 @@ bool FilePath::renameFile(const FilePath &target) const
|
||||
return QFile::rename(path(), target.path());
|
||||
}
|
||||
|
||||
qint64 FilePath::fileSize() const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.fileSize, return false);
|
||||
return s_deviceHooks.fileSize(*this);
|
||||
}
|
||||
return QFileInfo(m_data).size();
|
||||
}
|
||||
|
||||
QTextStream &operator<<(QTextStream &s, const FilePath &fn)
|
||||
{
|
||||
return s << fn.toString();
|
||||
|
||||
Reference in New Issue
Block a user