QFile exists return true for folders
-
Is it error or feature?
@
QUrl fileUrl("file://path/to/folder");
QString fname = fileUrl.toLocalFile();
if (QFile::exists(fname)) {
//true for folders and files
}
@ -
A feature. Take a look "here":http://qt-project.org/forums/viewthread/14871.
-
As I see, it's a feature, because folders, in fact, are special files.
Regars