mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
AppFwk : Add isFolderWritable()
This commit is contained in:
parent
e4afb24421
commit
5f790273e9
@ -251,6 +251,19 @@ QString Utils::fileExtension(const QString & fileName)
|
||||
return fi.suffix();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Utils::isFolderWritable(const QString& folderName)
|
||||
{
|
||||
// See platform issues here
|
||||
// http://doc.qt.io/qt-4.8/qfile.html#platform-specific-issues
|
||||
|
||||
QFileInfo dir(folderName);
|
||||
|
||||
return dir.isWritable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
|
||||
static bool fileExists(const QString& fileName);
|
||||
static QString fileExtension(const QString& fileName);
|
||||
static bool isFolderWritable(const QString& folderName);
|
||||
|
||||
static bool isStringMatch(const QString& filterString, const QString& value);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user