7#include <QtCore/qcompare.h>
8#include <QtCore/qfile.h>
9#include <QtCore/qlist.h>
10#include <QtCore/qshareddata.h>
11#include <QtCore/qmetatype.h>
12#include <QtCore/qdatetime.h>
13#include <QtCore/qtimezone.h>
29#ifdef QT_IMPLICIT_QFILEINFO_CONSTRUCTION
30#define QFILEINFO_MAYBE_EXPLICIT Q_IMPLICIT
32#define QFILEINFO_MAYBE_EXPLICIT explicit
43#elif QT_CONFIG(cxx17_filesystem)
44 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
47 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
53#undef QFILEINFO_MAYBE_EXPLICIT
58 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(
QFileInfo)
61 { d_ptr.swap(
other.d_ptr); }
63#if QT_CORE_REMOVED_SINCE(6, 8)
72 void setFile(
const std::filesystem::path &
file);
73#elif QT_CONFIG(cxx17_filesystem)
74 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
75 void setFile(
const T &
file) { setFile(QtPrivate::fromFilesystemPath(
file)); }
84 QString canonicalFilePath()
const;
85#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
86 std::filesystem::path filesystemFilePath()
const
87 {
return QtPrivate::toFilesystemPath(filePath()); }
88 std::filesystem::path filesystemAbsoluteFilePath()
const
90 std::filesystem::path filesystemCanonicalFilePath()
const
91 {
return QtPrivate::toFilesystemPath(canonicalFilePath()); }
95 QString completeBaseName()
const;
103#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
104 std::filesystem::path filesystemPath()
const {
return QtPrivate::toFilesystemPath(
path()); }
105 std::filesystem::path filesystemAbsolutePath()
const
107 std::filesystem::path filesystemCanonicalPath()
const
111 QDir absoluteDir()
const;
114 bool isWritable()
const;
115 bool isExecutable()
const;
116 bool isHidden()
const;
117 bool isNativePath()
const;
125 bool isSymLink()
const;
126 bool isSymbolicLink()
const;
127 bool isShortcut()
const;
128 bool isAlias()
const;
129 bool isJunction()
const;
131 bool isBundle()
const;
135 QString junctionTarget()
const;
137#if QT_CONFIG(cxx17_filesystem) || defined(Q_QDOC)
138 std::filesystem::path filesystemSymLinkTarget()
const
139 {
return QtPrivate::toFilesystemPath(symLinkTarget()); }
141 std::filesystem::path filesystemReadSymLink()
const
142 {
return QtPrivate::toFilesystemPath(
readSymLink()); }
144 std::filesystem::path filesystemJunctionTarget()
const
145 {
return QtPrivate::toFilesystemPath(junctionTarget()); }
149 uint ownerId()
const;
151 uint groupId()
const;
153 bool permission(QFile::Permissions permissions)
const;
154 QFile::Permissions permissions()
const;
170 bool caching()
const;
171 void setCaching(
bool on);
175 QSharedDataPointer<QFileInfoPrivate>
d_ptr;
183 return d_ptr.constData();
191#ifndef QT_NO_DEBUG_STREAM
\inmodule QtCore\reentrant
QDateTime lastRead() const
Returns the date and time when the file was last read (accessed).
QDateTime lastModified() const
Returns the date and time when the file was last modified.
QDateTime birthTime() const
Returns the date and time when the file was created (born), in local time.
QDateTime lastRead(const QTimeZone &tz) const
Returns the date and time when the file was last read (accessed).
QDateTime birthTime(const QTimeZone &tz) const
Returns the date and time when the file was created (born).
QDateTime metadataChangeTime(const QTimeZone &tz) const
Returns the date and time when the file's metadata was last changed.
QDateTime fileTime(QFile::FileTime time) const
QDateTime lastModified(const QTimeZone &tz) const
Returns the date and time when the file was last modified.
QSharedDataPointer< QFileInfoPrivate > d_ptr
QDateTime metadataChangeTime() const
Returns the date and time when the file's metadata was last changed, in local time.
bool isAbsolute() const
Returns true if the file system entry's path is absolute, otherwise returns false (that is,...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECLARE_EQUALITY_COMPARABLE(...)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
bool comparesEqual(const QDir &lhs, const QDir &rhs)
#define QFILEINFO_MAYBE_EXPLICIT
Q_CORE_EXPORT QDebug operator<<(QDebug, const QFileInfo &)
static QString readSymLink(const QFileSystemEntry &link)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLchar *const * path
static QT_BEGIN_NAMESPACE bool isRelative(const QString &path)
static QString absolutePath(const QString &path)
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static QString canonicalPath(const QString &rootPath)
static QString absoluteFilePath(const Options *options, const QString &relativeFileName)
return device isReadable() ? device -> read(static_cast< char * >(buf), size) :-1