forked from qt-creator/qt-creator
Utils: Add a FilePath::isDir() convenience function
Change-Id: I1df0ee1b136299ae6e4f2e5bd0bdc24bfeca33dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -936,6 +936,12 @@ bool FilePath::isLocal() const
|
||||
return m_url.isEmpty() || m_url.isLocalFile();
|
||||
}
|
||||
|
||||
bool FilePath::isDir() const
|
||||
{
|
||||
QTC_CHECK(m_url.isEmpty()); // FIXME: Not implemented yet.
|
||||
return QFileInfo(m_data).isDir();
|
||||
}
|
||||
|
||||
/// \returns the relativeChildPath of FilePath to parent if FilePath is a child of parent
|
||||
/// \note returns a empty FilePath if FilePath is not a child of parent
|
||||
/// That is, this never returns a path starting with "../"
|
||||
|
||||
Reference in New Issue
Block a user