QDir::mkpath



  • Hi
    Is it possible to find the reason that QDir::mkpath failed when it returns false

    Thanks


  • Qt Champions 2016

    @GrahamL said:

    QDir::mkpath

    this is the implantation
    So My best guess is sadly no since the actual mkdir
    lives in QDirPrivate.

    bool QDir::mkpath(const QString &dirPath) const
    {
        const QDirPrivate* d = d_ptr.constData();
    
        if (dirPath.isEmpty()) {
            qWarning("QDir::mkpath: Empty or null file name(s)");
            return false;
        }
    
        QString fn = filePath(dirPath);
        if (d->fileEngine.isNull())
            return QFileSystemEngine::createDirectory(QFileSystemEntry(fn), true);
        return d->fileEngine->mkdir(fn, true);
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.