45 #include <QtCore/qfile.h> 46 #include <QtCore/qlist.h> 47 #include <QtCore/qshareddata.h> 74 #ifdef Q_COMPILER_RVALUE_REFS 76 {
qSwap(d_ptr, other.d_ptr);
return *
this; }
83 void setFile(
const QString &file);
84 void setFile(
const QFile &file);
90 QString absoluteFilePath()
const;
91 QString canonicalFilePath()
const;
94 QString completeBaseName()
const;
103 QDir absoluteDir()
const;
105 bool isReadable()
const;
106 bool isWritable()
const;
107 bool isExecutable()
const;
108 bool isHidden()
const;
110 bool isRelative()
const;
116 bool isSymLink()
const;
118 bool isBundle()
const;
124 uint ownerId()
const;
126 uint groupId()
const;
128 bool permission(QFile::Permissions permissions)
const;
129 QFile::Permissions permissions()
const;
139 bool caching()
const;
140 void setCaching(
bool on);
151 inline QT3_SUPPORT
QString baseName(
bool complete) {
153 return completeBaseName();
156 inline QT3_SUPPORT
QString extension(
bool complete =
true)
const {
158 return completeSuffix();
161 inline QT3_SUPPORT
QString absFilePath()
const {
return absoluteFilePath(); }
163 inline QT3_SUPPORT
QString dirPath(
bool absPath =
false)
const {
165 return absolutePath();
168 QT3_SUPPORT
QDir dir(
bool absPath)
const;
169 inline QT3_SUPPORT
bool convertToAbs() {
return makeAbsolute(); }
170 #if !defined(Q_NO_TYPESAFE_FLAGS) 171 inline QT3_SUPPORT
bool permission(PermissionSpec permissions)
const 172 {
return permission(QFile::Permissions(static_cast<int>(permissions))); }
206 #endif // QFILEINFO_H The QDir class provides access to directory structures and their contents.
const QFileInfoPrivate * d_func() const
bool operator!=(const QFileInfo &fileinfo)
Returns true if this QFileInfo object refers to a different file than the one specified by fileinfo; ...
#define QT_END_NAMESPACE
This macro expands to.
QList< QFileInfo > QFileInfoList
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
bool isAbsolute() const
Returns true if the file path name is absolute, otherwise returns false if the path is relative...
QSharedDataPointer< QFileInfoPrivate > d_ptr
The QString class provides a Unicode character string.
QFileInfoPrivate * d_func()
static QString readLink(const QFileSystemEntry &link)
#define QT_BEGIN_NAMESPACE
This macro expands to.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
Q_DECLARE_TYPEINFO(QFileInfo, Q_MOVABLE_TYPE)
const T * constData() const
Returns a const pointer to the shared data object.
void qSwap(T &value1, T &value2)
The QDateTime class provides date and time functions.
The QFile class provides an interface for reading from and writing to files.
QString symLinkTarget() const
Returns the absolute path to the file or directory a symlink (or shortcut on Windows) points to...
bool operator!=(const QFileInfo &fileinfo) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QFileInfo class provides system-independent file information.
static QString fileName(const QString &fileUrl)
bool operator==(QBool b1, bool b2)