PDA

View Full Version : Is it me or QDir?



Morea
29th June 2007, 22:37
But what is the point of QDir not having mkpath or exists as static members?
Creating a QDir that I will not use seems a little silly. Or have I missed something?

jacek
29th June 2007, 23:06
Creating a QDir that I will not use seems a little silly.
You will use it... to check if it exists ;)

Anyway the docs say:
Check if a directory exists:

QDir dir("example");
if (!dir.exists())
qWarning("Cannot find the example directory");
(We could also use the static convenience function QFile::exists().)
Remember, from Unix point of view everything is a file.