Is there a function that given an absolute path will attempt to create all directories in the path that do not exist?
You can use
bool QDir::mkpath(const QString &dirPath) const
as described in the Qt4.x documentation
and Qt5.x documentation
Creates the directorypath dirPath.
The function will create all parent directories necessary to create the directory.
Returns true if successful; otherwise returns false.
If the path already exists when this function is called, it will return true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With