Logo Search packages:      
Sourcecode: ultracopier version File versions  Download package

void copyThread::removeAllFolderEmpty ( const QDir &  TheDir ) [private]

Remove all the source empty folder.

Returns:
Return true if success

Definition at line 746 of file CopyThread.cpp.

Referenced by flush().

{
      DEBUGCONSOLE(90,"copyThread::removeAllFolderEmpty","The dir: "+TheDir.absolutePath());
      QFileInfoList list = TheDir.entryInfoList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System,QDir::DirsFirst);
      if(list.isEmpty())
      {
            DEBUGCONSOLE(90,"copyThread::removeAllFolderEmpty","The folder is empty");
      }
      else
      {
            DEBUGCONSOLE(90,"copyThread::removeAllFolderEmpty","Listing");
            for (int i = 0; i < list.size(); ++i)
            {
                  QFileInfo fileInfo(list.at(i));
                  if(!fileInfo.isDir())
                  {
                        DEBUGCONSOLE(90,"copyThread::removeAllFolderEmpty","found a file: "+fileInfo.fileName());
                  }
                  else
                  {
                        //return the fonction for scan the new folder
                        removeAllFolderEmpty(TheDir.absolutePath()+fileInfo.fileName()+'/');
                        TheDir.rmdir(TheDir.absolutePath()+fileInfo.fileName()+'/');
                  }
            }
      }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index