Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:22

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QDIRITERATOR_H
0005 #define QDIRITERATOR_H
0006 
0007 #include <QtCore/qdir.h>
0008 
0009 QT_BEGIN_NAMESPACE
0010 
0011 class QDirIteratorPrivate;
0012 class Q_CORE_EXPORT QDirIterator
0013 {
0014 public:
0015     enum IteratorFlag {
0016         NoIteratorFlags = 0x0,
0017         FollowSymlinks = 0x1,
0018         Subdirectories = 0x2
0019     };
0020     Q_DECLARE_FLAGS(IteratorFlags, IteratorFlag)
0021 
0022     QDirIterator(const QDir &dir, IteratorFlags flags = NoIteratorFlags);
0023     QDirIterator(const QString &path,
0024                  IteratorFlags flags = NoIteratorFlags);
0025     QDirIterator(const QString &path,
0026                  QDir::Filters filter,
0027                  IteratorFlags flags = NoIteratorFlags);
0028     QDirIterator(const QString &path,
0029                  const QStringList &nameFilters,
0030                  QDir::Filters filters = QDir::NoFilter,
0031                  IteratorFlags flags = NoIteratorFlags);
0032 
0033     ~QDirIterator();
0034 
0035     QString next();
0036     QFileInfo nextFileInfo();
0037     bool hasNext() const;
0038 
0039     QString fileName() const;
0040     QString filePath() const;
0041     QFileInfo fileInfo() const;
0042     QString path() const;
0043 
0044 private:
0045     Q_DISABLE_COPY(QDirIterator)
0046 
0047     QScopedPointer<QDirIteratorPrivate> d;
0048     friend class QDir;
0049 };
0050 
0051 Q_DECLARE_OPERATORS_FOR_FLAGS(QDirIterator::IteratorFlags)
0052 
0053 QT_END_NAMESPACE
0054 
0055 #endif