43 #include <QtCore/qstring.h>
44 #include <QtCore/qfile.h>
45 #include <QtCore/qfileinfo.h>
46 #include <QtCore/qstringlist.h>
47 #include <QtCore/qshareddata.h>
61 AllEntries = Dirs | Files | Drives,
67 PermissionMask = 0x070,
79 NoDotAndDotDot = NoDot | NoDotDot,
104 SortFlags sort = SortFlags(
Name | IgnoreCase), Filters
filter = AllEntries);
108 SortFlags sort = SortFlags(
Name | IgnoreCase), Filters
filter = AllEntries);
109 #elif QT_CONFIG(cxx17_filesystem)
110 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
114 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
116 SortFlags sort = SortFlags(
Name | IgnoreCase), Filters
filter = AllEntries)
127 { d_ptr.swap(
other.d_ptr); }
132 #elif QT_CONFIG(cxx17_filesystem)
133 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
134 void setPath(
const T &
path)
136 setPath(QtPrivate::fromFilesystemPath(
path));
142 #if QT_CONFIG(cxx17_filesystem) || defined(Q_CLANG_QDOC)
144 {
return QtPrivate::toFilesystemPath(
path()); }
146 {
return QtPrivate::toFilesystemPath(absolutePath()); }
148 {
return QtPrivate::toFilesystemPath(canonicalPath()); }
155 #elif QT_CONFIG(cxx17_filesystem)
156 template<
typename T, QtPrivate::ForceFilesystemPath<T> = 0>
157 static void addSearchPath(
const QString &prefix,
const T &
path)
159 addSearchPath(prefix, QtPrivate::fromFilesystemPath(
path));
172 bool cd(
const QString &dirName);
179 void setFilter(Filters
filter);
180 SortFlags sorting()
const;
181 void setSorting(SortFlags sort);
184 bool isEmpty(Filters
filters = Filters(AllEntries | NoDotAndDotDot))
const;
192 SortFlags sort = NoSort)
const;
196 SortFlags sort = NoSort)
const;
198 bool mkdir(
const QString &dirName)
const;
199 bool mkdir(
const QString &dirName, QFile::Permissions permissions)
const;
200 bool rmdir(
const QString &dirName)
const;
201 bool mkpath(
const QString &dirPath)
const;
202 bool rmpath(
const QString &dirPath)
const;
204 bool removeRecursively();
206 bool isReadable()
const;
212 bool isRelative()
const;
227 #if defined(Q_OS_WIN)
236 #if defined(Q_OS_WIN)
254 #if QT_CONFIG(regularexpression)
260 void refresh()
const;
278 #ifndef QT_NO_DEBUG_STREAM
The QChar class provides a 16-bit Unicode character.
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
The QDir class provides access to directory structures and their contents.
bool operator!=(const QDir &dir) const
static bool isAbsolutePath(const QString &path)
static void setSearchPaths(const QString &prefix, const QStringList &searchPaths)
static QStringList searchPaths(const QString &prefix)
QSharedDataPointer< QDirPrivate > d_ptr
static void addSearchPath(const QString &prefix, const QString &path)
constexpr static QChar listSeparator() noexcept
The QDirIterator class provides an iterator for directory entrylists.
const T * constData() const noexcept
The QString class provides a Unicode character string.
The QStringList class provides a list of strings.
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
#define QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(Class)
bool operator==(const QMakeBaseKey &one, const QMakeBaseKey &two)
GLenum GLenum GLsizei count
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei const GLchar *const * path
#define Q_DECLARE_SHARED(TYPE)
settings remove("monkey")
dialog setNameFilters(filters)
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.