/*! \internal */ void QDirIteratorPrivate::pushDirectory(const QFileInfo &fileInfo) { QString path = fileInfo.filePath(); #ifdef Q_OS_WIN if (fileInfo.isSymLink()) path = fileInfo.canonicalFilePath(); #endif if (iteratorFlags & QDirIterator::FollowSymlinks) visitedLinks << fileInfo.canonicalFilePath(); if (engine) { engine->setFileName(path); QAbstractFileEngineIterator *it = engine->beginEntryList(filters, nameFilters); if (it) { it->setPath(path); fileEngineIterators << it; } else { // No iterator; no entry list. } } else { #ifndef QT_NO_FILESYSTEMITERATOR QFileSystemIterator *it = new QFileSystemIterator(fileInfo.d_ptr->fileEntry, filters, nameFilters, iteratorFlags); nativeIterators << it; #endif } }
/*! \internal */ void QDirIteratorPrivate::pushDirectory(const QFileInfo &fileInfo) { QString path = fileInfo.filePath(); #ifdef Q_OS_WIN if (fileInfo.isSymLink()) path = fileInfo.canonicalFilePath(); #endif if (iteratorFlags & QDirIterator::FollowSymlinks) visitedLinks << fileInfo.canonicalFilePath(); if (engine) { engine->setFileName(path); QAbstractFileEngineIterator *it = engine->beginEntryList(filters, nameFilters); if (it) { it->setPath(path); fileEngineIterators << it; } else { // No iterator; no entry list. } } }
/*! \internal */ void QDirIteratorPrivate::pushSubDirectory(const QString &path, const QStringList &nameFilters, QDir::Filters filters) { if (iteratorFlags & QDirIterator::FollowSymlinks) { if (nextFileInfo.filePath() != path) nextFileInfo.setFile(path); if (nextFileInfo.isSymLink()) { visitedLinks << nextFileInfo.canonicalFilePath(); } else { visitedLinks << nextFileInfo.absoluteFilePath(); } } if (engine || (engine = QAbstractFileEngine::create(this->path))) { engine->setFileName(path); QAbstractFileEngineIterator *it = engine->beginEntryList(filters, nameFilters); if (it) { it->setPath(path); fileEngineIterators << it; } else { // No iterator; no entry list. } } }