aboutsummaryrefslogtreecommitdiff
path: root/src/main/oshelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/oshelper.cpp')
-rw-r--r--src/main/oshelper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/oshelper.cpp b/src/main/oshelper.cpp
index 2ca0e400..cb9aca7a 100644
--- a/src/main/oshelper.cpp
+++ b/src/main/oshelper.cpp
@@ -248,6 +248,12 @@ QString OSHelper::temporaryPath() const
return QDir::tempPath();
}
+bool OSHelper::isWritableDirectory(const QString &path) const
+{
+ const QFileInfo info(path);
+ return info.exists() && info.isDir() && info.isWritable();
+}
+
QString OSHelper::randomPassword(int numBytes) const
{
numBytes = qBound(16, numBytes, 128);