8#include <QtCore/qfiledevice.h>
9#include <QtCore/qflags.h>
10#include <QtCore/qtclasshelpermacros.h>
11#include <QtCore/qtcoreexports.h>
12#include <QtCore/qdatetime.h>
19class QDirListingPrivate;
65 Q_CORE_EXPORT QString
fileName()
const;
72 Q_CORE_EXPORT
bool isDir()
const;
73 Q_CORE_EXPORT
bool isFile()
const;
75 Q_CORE_EXPORT
bool exists()
const;
80 Q_CORE_EXPORT QFileInfo
fileInfo()
const;
84 Q_CORE_EXPORT qint64
size()
const;
87 {
return fileTime(QFileDevice::FileBirthTime, tz); }
89 {
return fileTime(QFileDevice::FileMetadataChangeTime, tz); }
91 {
return fileTime(QFileDevice::FileModificationTime, tz); }
93 {
return fileTime(QFileDevice::FileAccessTime, tz); }
110 using iterator_category =
std::input_iterator_tag;
113 using pointer =
const value_type *;
114 using reference =
const value_type &;
125 bool atEnd()
const noexcept {
return dirEntry.dirListPtr ==
nullptr; }
127#ifndef __cpp_impl_three_way_comparison
160 friend class QDirPrivate;
162 friend class QAbstractFileEngine;
163 friend class QFileInfoGatherer;
166Q_DECLARE_OPERATORS_FOR_FLAGS(
QDirListing::IteratorFlags)
~QAbstractFileEngineHandlerList()
\inmodule QtCore\reentrant
QDateTime birthTime(const QTimeZone &tz) const
QDateTime metadataChangeTime(const QTimeZone &tz) const
Q_CORE_EXPORT bool isReadable() const
Q_CORE_EXPORT bool isHidden() const
Q_CORE_EXPORT bool isWritable() const
Q_CORE_EXPORT bool isExecutable() const
Q_CORE_EXPORT bool isFile() const
Q_CORE_EXPORT bool exists() const
Q_CORE_EXPORT bool isSymLink() const
Q_CORE_EXPORT bool isDir() const
QDateTime lastRead(const QTimeZone &tz) const
See the QFileInfo methods with the same names.
QDateTime lastModified(const QTimeZone &tz) const
const_iterator(const_iterator &&) noexcept=default
reference operator*() const
Returns a {const QDirListing::DirEntry &} of the directory entry this iterator points to.
friend bool operator==(sentinel, const const_iterator &rhs) noexcept
const_iterator & operator=(const_iterator &&) noexcept=default
pointer operator->() const
Returns a {const QDirListing::DirEntry *} to the directory entry this iterator points to.
friend bool operator!=(sentinel, const const_iterator &rhs) noexcept
friend bool operator!=(const const_iterator &lhs, sentinel) noexcept
const_iterator & operator++()
Pre-increment operator.
friend bool operator==(const const_iterator &lhs, sentinel) noexcept
\typealias QDirListing::const_iterator::reference
friend constexpr bool operator==(sentinel, sentinel) noexcept
friend constexpr bool operator!=(sentinel, sentinel) noexcept
IteratorFlag
This enum class describes flags that can be used to configure the behavior of QDirListing.
const_iterator cbegin() const
QDirListing(QDirListing &&other) noexcept
const_iterator constBegin() const
sentinel constEnd() const
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
Emulated const pointer to QVariant based on a pointer.
QVariantPointer is a template class that emulates a pointer to QVariant based on a pointer.
QVariantPointer(const Pointer *pointer)
Constructs a QVariantPointer from the given pointer.
QVariantRef< Pointer > operator*() const
Dereferences the QVariantPointer to a QVariantRef.
Pointer operator->() const
Dereferences and returns the pointer.
The QVariantRef acts as a non-const reference to a QVariant.
operator QVariant() const
Resolves the QVariantRef to an actual QVariant.
QVariantRef & operator=(const QVariantRef &value)
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
QVariantRef & operator=(const QVariant &value)
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
QVariantRef(const QVariantRef &)=default
QVariantRef(QVariantRef &&)=default
friend void swap(QVariantRef a, QVariantRef b)
QVariantRef & operator=(QVariantRef &&value)
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
QVariantRef(const Pointer *reference)
Creates a QVariantRef from an pointer.
Combined button and popup list for selecting options.
static QString appendSlashIfNeeded(const QString &path)
T qvariant_cast(QVariant &&v)
T qvariant_cast(const QVariant &)
void swap(QVariant &value1, QVariant &value2) noexcept