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?
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?
You will use it... to check if it exists
Anyway the docs say:Remember, from Unix point of view everything is a file.Check if a directory exists:
(We could also use the static convenience function QFile::exists().)Qt Code:
if (!dir.exists()) qWarning("Cannot find the example directory");To copy to clipboard, switch view to plain text mode
Morea (29th June 2007)
Bookmarks