check if Android sdk folder is writable

Fixes: QTCREATORBUG-21943
Change-Id: Ic20ed4c24c567b0b08269b7ad07014eb4248b214
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Frederik Schwarzer
2019-08-12 01:41:41 +02:00
parent 7ffc1f5349
commit 4ca3bd4d0f
3 changed files with 13 additions and 2 deletions

View File

@@ -768,6 +768,13 @@ bool FilePath::exists() const
return !isEmpty() && QFileInfo::exists(m_data);
}
/// \returns a bool indicating whether a path is writable.
bool FilePath::isWritablePath() const
{
const QFileInfo fi{m_data};
return exists() && fi.isDir() && fi.isWritable();
}
/// Find the parent directory of a given directory.
/// Returns an empty FilePath if the current directory is already