Reputation: 5497
Given a path to a folder how to find out whether my application needs administrative privileges to create, delete or modify files into this folder?
Qt 5 Windows 8.1
I'd preffer a cross-platform solution. But platform specific will do too.
Upvotes: 2
Views: 132
Reputation: 10455
Use QFileInfo::isWritable()
:
if (fileInfo.isDir() && fileInfo.isWritable()){
....
}
Upvotes: 1