forked from qt-creator/qt-creator
Utils: Add a FilePath::isResourceFile function
Change-Id: I281e91bc24f5c32a5d64c31e73b7fc2f31cbade2 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -241,6 +241,15 @@ bool FilePath::isRootPath() const
|
|||||||
return *this == HostOsInfo::root();
|
return *this == HostOsInfo::root();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FilePath::isResourceFile() const
|
||||||
|
{
|
||||||
|
if (scheme() == u"qrc")
|
||||||
|
return true;
|
||||||
|
if (needsDevice())
|
||||||
|
return false;
|
||||||
|
return pathView().startsWith(':');
|
||||||
|
}
|
||||||
|
|
||||||
QString FilePath::encodedHost() const
|
QString FilePath::encodedHost() const
|
||||||
{
|
{
|
||||||
QString result = host().toString();
|
QString result = host().toString();
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ public:
|
|||||||
bool isSymLink() const;
|
bool isSymLink() const;
|
||||||
bool hasHardLinks() const;
|
bool hasHardLinks() const;
|
||||||
bool isRootPath() const;
|
bool isRootPath() const;
|
||||||
|
bool isResourceFile() const;
|
||||||
bool isNewerThan(const QDateTime &timeStamp) const;
|
bool isNewerThan(const QDateTime &timeStamp) const;
|
||||||
QDateTime lastModified() const;
|
QDateTime lastModified() const;
|
||||||
QFile::Permissions permissions() const;
|
QFile::Permissions permissions() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user