Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDir::mkpath
Forum Update on Monday, May 27th 2025

QDir::mkpath

Scheduled Pinned Locked Moved General and Desktop
qdir
2 Posts 2 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

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

    Thanks

    mrjjM 1 Reply Last reply
    0
    • G GrahamL

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

      Thanks

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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);
      }
      
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved