![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore More...
#include <qdir.h>
Public Types | |
enum | Filter { Dirs = 0x001 , Files = 0x002 , Drives = 0x004 , NoSymLinks = 0x008 , AllEntries = Dirs | Files | Drives , TypeMask = 0x00f , Readable = 0x010 , Writable = 0x020 , Executable = 0x040 , PermissionMask = 0x070 , Modified = 0x080 , Hidden = 0x100 , System = 0x200 , AccessMask = 0x3F0 , AllDirs = 0x400 , CaseSensitive = 0x800 , NoDot = 0x2000 , NoDotDot = 0x4000 , NoDotAndDotDot = NoDot | NoDotDot , NoFilter = -1 } |
This enum describes the filtering options available to QDir; e.g. More... | |
enum | SortFlag { Name = 0x00 , Time = 0x01 , Size = 0x02 , Unsorted = 0x03 , SortByMask = 0x03 , DirsFirst = 0x04 , Reversed = 0x08 , IgnoreCase = 0x10 , DirsLast = 0x20 , LocaleAware = 0x40 , Type = 0x80 , NoSort = -1 } |
This enum describes the sort options available to QDir, e.g. More... | |
Public Member Functions | |
QDir (const QDir &) | |
Constructs a QDir object that is a copy of the QDir object for directory dir. | |
QDir (const QString &path=QString()) | |
Constructs a QDir pointing to the given directory path. | |
QDir (const QString &path, const QString &nameFilter, SortFlags sort=SortFlags(Name|IgnoreCase), Filters filter=AllEntries) | |
Constructs a QDir with path path, that filters its entries by name using nameFilter and by attributes using filters. | |
~QDir () | |
Destroys the QDir object frees up its resources. | |
QDir & | operator= (const QDir &) |
Move-assigns other to this QDir instance. | |
void | swap (QDir &other) noexcept |
void | setPath (const QString &path) |
Sets the path of the directory to path. | |
QString | path () const |
Returns the path. | |
QString | absolutePath () const |
Returns the absolute path (a path that starts with "/" or with a drive specification), which may contain symbolic links, but never contains redundant ".", ".." or multiple separators. | |
QString | canonicalPath () const |
Returns the canonical path, i.e. | |
QString | dirName () const |
Returns the name of the directory; this is not the same as the path, e.g. | |
QString | filePath (const QString &fileName) const |
Returns the path name of a file in the directory. | |
QString | absoluteFilePath (const QString &fileName) const |
Returns the absolute path name of a file in the directory. | |
QString | relativeFilePath (const QString &fileName) const |
Returns the path to fileName relative to the directory. | |
bool | cd (const QString &dirName) |
Changes the QDir's directory to dirName. | |
bool | cdUp () |
Changes directory by moving one directory up from the QDir's current directory. | |
QStringList | nameFilters () const |
Returns the string list set by setNameFilters() | |
void | setNameFilters (const QStringList &nameFilters) |
Sets the name filters used by entryList() and entryInfoList() to the list of filters specified by nameFilters. | |
Filters | filter () const |
Returns the value set by setFilter() | |
void | setFilter (Filters filter) |
Sets the filter used by entryList() and entryInfoList() to filters. | |
SortFlags | sorting () const |
Returns the value set by setSorting() | |
void | setSorting (SortFlags sort) |
Sets the sort order used by entryList() and entryInfoList(). | |
qsizetype | count (QT6_DECL_NEW_OVERLOAD) const |
Returns the total number of directories and files in the directory. | |
bool | isEmpty (Filters filters=Filters(AllEntries|NoDotAndDotDot)) const |
Returns whether the directory is empty. | |
QString | operator[] (qsizetype) const |
Returns the file name at position pos in the list of file names. | |
QStringList | entryList (Filters filters=NoFilter, SortFlags sort=NoSort) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of the names of all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting(). | |
QStringList | entryList (const QStringList &nameFilters, Filters filters=NoFilter, SortFlags sort=NoSort) const |
Returns a list of the names of all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting(). | |
QFileInfoList | entryInfoList (Filters filters=NoFilter, SortFlags sort=NoSort) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of QFileInfo objects for all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting(). | |
QFileInfoList | entryInfoList (const QStringList &nameFilters, Filters filters=NoFilter, SortFlags sort=NoSort) const |
Returns a list of QFileInfo objects for all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting(). | |
bool | mkdir (const QString &dirName) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates a sub-directory called dirName with default permissions. | |
bool | mkdir (const QString &dirName, QFile::Permissions permissions) const |
Creates a sub-directory called dirName. | |
bool | rmdir (const QString &dirName) const |
Removes the directory specified by dirName. | |
bool | mkpath (const QString &dirPath) const |
Creates the directory path dirPath. | |
bool | rmpath (const QString &dirPath) const |
Removes the directory path dirPath. | |
bool | removeRecursively () |
bool | isReadable () const |
Returns true if the directory is readable and we can open files by name; otherwise returns false . | |
bool | exists () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the directory exists; otherwise returns false . | |
bool | isRoot () const |
Returns true if the directory is the root directory; otherwise returns false . | |
bool | isRelative () const |
Returns true if the directory path is relative; otherwise returns false. | |
bool | isAbsolute () const |
Returns true if the directory's path is absolute; otherwise returns false . | |
bool | makeAbsolute () |
Converts the directory path to an absolute path. | |
bool | operator== (const QDir &dir) const |
Returns true if directory dir and this directory have the same path and their sort and filter settings are the same; otherwise returns false . | |
bool | operator!= (const QDir &dir) const |
Returns true if directory dir and this directory have different paths or different sort or filter settings; otherwise returns false. | |
bool | remove (const QString &fileName) |
Removes the file, fileName. | |
bool | rename (const QString &oldName, const QString &newName) |
Renames a file or directory from oldName to newName, and returns true if successful; otherwise returns false . | |
bool | exists (const QString &name) const |
Returns true if the file called name exists; otherwise returns false. | |
void | refresh () const |
Refreshes the directory information. | |
Static Public Member Functions | |
static void | setSearchPaths (const QString &prefix, const QStringList &searchPaths) |
static void | addSearchPath (const QString &prefix, const QString &path) |
static QStringList | searchPaths (const QString &prefix) |
static QString | toNativeSeparators (const QString &pathName) |
static QString | fromNativeSeparators (const QString &pathName) |
static QStringList | nameFiltersFromString (const QString &nameFilter) |
static bool | isRelativePath (const QString &path) |
Returns true if path is relative; returns false if it is absolute. | |
static bool | isAbsolutePath (const QString &path) |
Returns true if path is absolute; returns false if it is relative. | |
static QFileInfoList | drives () |
Returns a list of the root directories on this system. | |
static constexpr QChar | listSeparator () noexcept |
static QChar | separator () |
Returns the native directory separator: "/" under Unix and "\\" under Windows. | |
static bool | setCurrent (const QString &path) |
Sets the application's current working directory to path. | |
static QDir | current () |
Returns the application's current directory. | |
static QString | currentPath () |
Returns the absolute path of the application's current directory. | |
static QDir | home () |
Returns the user's home directory. | |
static QString | homePath () |
Returns the absolute path of the user's home directory. | |
static QDir | root () |
Returns the root directory. | |
static QString | rootPath () |
Returns the absolute path of the root directory. | |
static QDir | temp () |
Returns the system's temporary directory. | |
static QString | tempPath () |
Returns the absolute canonical path of the system's temporary directory. | |
static QString | cleanPath (const QString &path) |
Returns path with directory separators normalized (that is, platform-native separators converted to "/") and redundant ones removed, and "."s and ".."s resolved (as far as possible). | |
Protected Member Functions | |
QDir (QDirPrivate &d) | |
Protected Attributes | |
QSharedDataPointer< QDirPrivate > | d_ptr |
Friends | |
class | QDirIterator |
\inmodule QtCore
The QDir class provides access to directory structures and their contents.
\reentrant
A QDir is used to manipulate path names, access information regarding paths and files, and manipulate the underlying file system. It can also be used to access Qt's \l{resource system}.
Qt uses "/" as a universal directory separator in the same way that "/" is used as a path separator in URLs. If you always use "/" as a directory separator, Qt will translate your paths to conform to the underlying operating system.
A QDir can point to a file using either a relative or an absolute path. Absolute paths begin with the directory separator (optionally preceded by a drive specification under Windows). Relative file names begin with a directory name or a file name and specify a path relative to the current directory.
Examples of absolute paths:
On Windows, the second example above will be translated to {C:\Users} when used to access files.
Examples of relative paths:
You can use the isRelative() or isAbsolute() functions to check if a QDir is using a relative or an absolute file path. Call makeAbsolute() to convert a relative QDir to an absolute one.
enum QDir::Filter |
This enum describes the filtering options available to QDir; e.g.
for entryList() and entryInfoList(). The filter value is specified by combining values from the following list using the bitwise OR operator:
\value Dirs List directories that match the filters. \value AllDirs List all directories; i.e. don't apply the filters to directory names. \value Files List files. \value Drives List disk drives (ignored under Unix). \value NoSymLinks Do not list symbolic links (ignored by operating systems that don't support symbolic links). \value NoDotAndDotDot Do not list the special entries "." and "..". \value NoDot Do not list the special entry ".". \value NoDotDot Do not list the special entry "..". \value AllEntries List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System). \value Readable List files for which the application has read access. The Readable value needs to be combined with Dirs or Files. \value Writable List files for which the application has write access. The Writable value needs to be combined with Dirs or Files. \value Executable List files for which the application has execute access. The Executable value needs to be combined with Dirs or Files. \value Modified Only list files that have been modified (ignored on Unix). \value Hidden List hidden files (on Unix, files starting with a "."). \value System List system files (on Unix, FIFOs, sockets and device files are included; on Windows, {
.lnk} files are included) \value CaseSensitive The filter should be case sensitive.
\omitvalue TypeMask \omitvalue AccessMask \omitvalue PermissionMask \omitvalue NoFilter
Functions that use Filter enum values to filter lists of files and directories will include symbolic links to files and directories unless you set the NoSymLinks value.
A default constructed QDir will not filter out files based on their permissions, so entryList() and entryInfoList() will return all files that are readable, writable, executable, or any combination of the three. This makes the default easy to write, and at the same time useful.
For example, setting the Readable
, Writable
, and Files
flags allows all files to be listed for which the application has read access, write access or both. If the Dirs
and Drives
flags are also included in this combination then all drives, directories, all files that the application can read, write, or execute, and symlinks to such files/directories can be listed.
To retrieve the permissions for a directory, use the entryInfoList() function to get the associated QFileInfo objects and then use the QFileInfo::permissions() to obtain the permissions and ownership for each file.
Enumerator | |
---|---|
Dirs | |
Files | |
Drives | |
NoSymLinks | |
AllEntries | |
TypeMask | |
Readable | |
Writable | |
Executable | |
PermissionMask | |
Modified | |
Hidden | |
System | |
AccessMask | |
AllDirs | |
CaseSensitive | |
NoDot | |
NoDotDot | |
NoDotAndDotDot | |
NoFilter |
enum QDir::SortFlag |
This enum describes the sort options available to QDir, e.g.
for entryList() and entryInfoList(). The sort value is specified by OR-ing together values from the following list:
\value Name Sort by name. \value Time Sort by time (modification time). \value Size Sort by file size. \value Type Sort by file type (extension). \value Unsorted Do not sort. \value NoSort Not sorted by default.
\value DirsFirst Put the directories first, then the files. \value DirsLast Put the files first, then the directories. \value Reversed Reverse the sort order. \value IgnoreCase Sort case-insensitively. \value LocaleAware Sort items appropriately using the current locale settings.
\omitvalue SortByMask
You can only specify one of the first four.
If you specify both DirsFirst and Reversed, directories are still put first, but in reverse order; the files will be listed after the directories, again in reverse order.
Enumerator | |
---|---|
Name | |
Time | |
Size | |
Unsorted | |
SortByMask | |
DirsFirst | |
Reversed | |
IgnoreCase | |
DirsLast | |
LocaleAware | |
Type | |
NoSort |
QDir::QDir | ( | const QDir & | dir | ) |
Constructs a QDir object that is a copy of the QDir object for directory dir.
Constructs a QDir pointing to the given directory path.
If path is empty the program's working directory, ("."), is used.
QDir::QDir | ( | const QString & | path, |
const QString & | nameFilter, | ||
SortFlags | sort = SortFlags(Name | IgnoreCase) , |
||
Filters | filters = AllEntries |
||
) |
Constructs a QDir with path path, that filters its entries by name using nameFilter and by attributes using filters.
It also sorts the names using sort.
The default nameFilter is an empty string, which excludes nothing; the default filters is \l AllEntries, which also excludes nothing. The default sort is \l Name | \l IgnoreCase, i.e. sort by name case-insensitively.
If path is an empty string, QDir uses "." (the current directory). If nameFilter is an empty string, QDir uses the name filter "*" (all files).
QDir::~QDir | ( | ) |
|
explicitprotected |
Returns the absolute path name of a file in the directory.
Does not check if the file actually exists in the directory; but see exists(). Redundant multiple separators or "." and ".." directories in fileName are not removed (see cleanPath()).
Definition at line 809 of file qdir.cpp.
References d, QString::endsWith(), fileName, QString::left(), Q_LIKELY, qUtf8Printable, qWarning, toNativeSeparators(), and treatAsAbsolute().
Referenced by QCoreApplication::applicationFilePath(), copyFiles(), createImageNode(), deployPlugin(), QQuickTableViewPrivate::dumpTable(), findQtPlugins(), QMediaStorageLocation::generateFileName(), QGeoFileTileCacheOsm::getFromOfflineStorage(), QSSGIblBaker::import(), QLoggingRegistry::initializeRules(), loadTzTimeZones(), makeAbsolute(), QTest::qFindTestData(), qRelocateResourceFile(), searchExecutable(), and setMaterialProperties().
QString QDir::absolutePath | ( | ) | const |
Returns the absolute path (a path that starts with "/" or with a drive specification), which may contain symbolic links, but never contains redundant ".", ".." or multiple separators.
Definition at line 667 of file qdir.cpp.
References QAbstractFileEngine::AbsoluteName, and d.
Referenced by QMovie::QMovie(), combinePath(), copyAndroidTemplate(), copyGradleTemplate(), deleteMissingFiles(), AssimpImporter::import(), makeAbsolute(), QFileSystemModelPrivate::node(), QQmlLocalStorage::openDatabaseSync(), quick_test_main_with_setup(), relativeFilePath(), removeRecursively(), scanImports(), QMovie::setFileName(), and QQuickFileDialogImpl::setInitialCurrentFolderAndSelectedFile().
Adds path to the search path for prefix.
Definition at line 1139 of file qdir.cpp.
QString QDir::canonicalPath | ( | ) | const |
Returns the canonical path, i.e.
a path without symbolic links or redundant "." or ".." elements.
On systems that do not have symbolic links this function will always return the same string that absolutePath() returns. If the canonical path does not exist (normally due to dangling symbolic links) canonicalPath() returns an empty string.
Example:
Definition at line 692 of file qdir.cpp.
References QAbstractFileEngine::CanonicalName, QFileSystemEngine::canonicalName(), d, and QFileSystemEntry::filePath().
Referenced by QCoreApplicationPrivate::appendApplicationPathToLibraryPaths(), operator==(), QFileSystemEngine::tempPath(), and wrapInFunction().
bool QDir::cd | ( | const QString & | dirName | ) |
Changes the QDir's directory to dirName.
Returns true
if the new directory exists; otherwise returns false
. Note that the logical cd() operation is not performed if the new directory does not exist.
Calling cd("..") is equivalent to calling cdUp().
Definition at line 984 of file qdir.cpp.
References QFileInfo::absoluteFilePath(), QSharedDataPointer< T >::constData(), d, d_ptr, dir, dirName(), QString::endsWith(), QString::indexOf(), isAbsolutePath(), QString::isEmpty(), ok, qt_cleanPath(), and QString::startsWith().
Referenced by cdUp(), and freeDesktopTrashLocation().
bool QDir::cdUp | ( | ) |
Changes directory by moving one directory up from the QDir's current directory.
Returns true
if the new directory exists; otherwise returns false
. Note that the logical cdUp() operation is not performed if the new directory does not exist.
Definition at line 1042 of file qdir.cpp.
References cd(), and QString::fromLatin1().
Referenced by checkForDrmPermission(), findQmlDirectory(), QTest::qFindTestData(), and quick_test_main_with_setup().
Returns path with directory separators normalized (that is, platform-native separators converted to "/") and redundant ones removed, and "."s and ".."s resolved (as far as possible).
Symbolic links are kept. This function does not return the canonical path, but rather the simplest version of the input. For example, "./local" becomes "local", "local/../bin" becomes "bin" and "/local/usr/../bin" becomes "/local/bin".
Definition at line 2395 of file qdir.cpp.
References qt_cleanPath().
Referenced by _q_resolveEntryAndCreateLegacyEngine_recursive(), _qt_get_directory(), QFileSystemEngine::absoluteName(), absolutePath(), QUrlModel::addUrls(), QFileSystemEngine::canonicalName(), checkExecutable(), cleanPath(), deployQmlImports(), dirsList(), findBinary(), QStandardPaths::findExecutable(), findInPath(), getBinaryDependencies(), QFileSystemEngine::getLinkTarget(), QFileSystemEngine::homePath(), loadModelBlendParticleMesh(), loadModelShapeMesh(), main(), makefileEscape(), parseArguments(), parseEarlyArguments(), parseOtoolLibraryLine(), QWindowsShellItem::path(), QLibraryInfoPrivate::path(), prefixFromAppDirHelper(), qt_resource_fixResourceRoot(), readAndroidDependencyXml(), relativeFilePath(), QFileSystemEngine::removeDirectory(), QDirPrivate::resolveAbsoluteEntry(), resolveDyldPrefix(), QQuickFolderListModelPrivate::resolvePath(), runRcc(), scanImports(), QFileDialog::setDirectory(), QFileSystemModel::setRootPath(), QStandardPaths::standardLocations(), QFileSystemEngine::tempPath(), vcRedistDir(), and QQmlJSImportVisitor::visit().
qsizetype QDir::count | ( | QT6_DECL_NEW_OVERLOAD | ) | const |
Returns the total number of directories and files in the directory.
Equivalent to entryList().count().
{uint}, not
{qsizetype}.Definition at line 1322 of file qdir.cpp.
References d.
|
inlinestatic |
Returns the application's current directory.
The directory is constructed using the absolute path of the current directory, ensuring that its path() will be the same as its absolutePath().
Definition at line 216 of file qdir.h.
Referenced by _qt_get_directory(), QCoreApplication::applicationFilePath(), combinePath(), copyAndroidTemplate(), copyGradleTemplate(), createProject(), QQuickTableViewPrivate::dumpTable(), handleCompileErrors(), parseOptions(), quick_test_main_with_setup(), and searchExecutable().
|
static |
Returns the absolute path of the application's current directory.
The current directory is the last directory set with QDir::setCurrent() or, if that was never called, the directory at which this application was started at by the parent process.
Definition at line 2051 of file qdir.cpp.
References QFileSystemEngine::currentPath(), and QFileSystemEntry::filePath().
Referenced by QFileDialogArgs::QFileDialogArgs(), QQuickFolderDialog::QQuickFolderDialog(), absolutePath(), QQmlEngine::baseUrl(), buildAndroidProject(), QQuickFolderListModel::componentComplete(), createRcc(), createSymbolicLink(), QQuickFileDialog::currentFolder(), QMediaStorageLocation::defaultDirectory(), QIOSFileDialog::hide(), main(), parseOtoolLibraryLine(), prefixFromAppDirHelper(), Q_TRACE_INSTRUMENT(), QTest::qFindTestData(), QTest::qtest_qParseArgs(), quick_test_main_with_setup(), RCCResourceLibrary::readFiles(), QFFmpegMediaRecorder::record(), QGstreamerMediaEncoder::record(), resolveDyldPrefix(), runQmlImportScanner(), QMediaPlayerPrivate::setMedia(), QQuick3DAmbientSound::setSource(), and QQuick3DSpatialSound::setSource().
QString QDir::dirName | ( | ) | const |
Returns the name of the directory; this is not the same as the path, e.g.
a directory with the name "mail", might have the path "/var/spool/mail". If the directory has no name (e.g. it is the root directory) an empty string is returned.
No check is made to ensure that a directory with this name actually exists; but see exists().
Definition at line 715 of file qdir.cpp.
References QAbstractFileEngine::BaseName, d, d_ptr, and QDirPrivate::fileEngine.
Referenced by cd(), copyAndroidExtraResources(), createProject(), deployPlugin(), findQmlDirectory(), mkdir(), mkdir(), packagePath(), QTest::qFindTestData(), quick_test_main_with_setup(), rmdir(), and wrapInFunction().
|
static |
Returns a list of the root directories on this system.
On Windows this returns a list of QFileInfo objects containing "C:/", "D:/", etc. This does not return drives with ejectable media that are empty. On other operating systems, it returns a list containing just one root directory (i.e. "/").
Definition at line 1984 of file qdir.cpp.
References QFSFileEngine::drives().
QFileInfoList QDir::entryInfoList | ( | const QStringList & | nameFilters, |
Filters | filters = NoFilter , |
||
SortFlags | sort = NoSort |
||
) | const |
Returns a list of QFileInfo objects for all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting().
The name filter, file attribute filter, and sorting specification can be overridden using the nameFilters, filters, and sort arguments.
Returns an empty list if the directory is unreadable, does not exist, or if nothing matches the specification.
Definition at line 1461 of file qdir.cpp.
References QList< T >::append(), d, filters, it, nameFilters(), NoFilter, NoSort, and ret.
QFileInfoList QDir::entryInfoList | ( | Filters | filters = NoFilter , |
SortFlags | sort = NoSort |
||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of QFileInfo objects for all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting().
The attribute filter and sorting specifications can be overridden using the filters and sort arguments.
Returns an empty list if the directory is unreadable, does not exist, or if nothing matches the specification.
Definition at line 1387 of file qdir.cpp.
References d, entryInfoList(), and filters.
Referenced by cleanTopFolders(), QBenchmarkValgrindUtils::cleanup(), copyFiles(), deleteMissingFiles(), deployTranslations(), entryInfoList(), findBinary(), findMinGWRuntimePaths(), findQtPlugins(), QQuickControlsTestUtils::forEachControl(), FileInfoThread::getFileInfos(), QBenchmarkValgrindUtils::getNewestFileName(), QQuickFolderDialogImplPrivate::updateSelectedFolder(), and vcRedistDir().
QStringList QDir::entryList | ( | const QStringList & | nameFilters, |
Filters | filters = NoFilter , |
||
SortFlags | sort = NoSort |
||
) | const |
Returns a list of the names of all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting().
The name filter, file attribute filter, and sorting specification can be overridden using the nameFilters, filters, and sort arguments.
Returns an empty list if the directory is unreadable, does not exist, or if nothing matches the specification.
Definition at line 1409 of file qdir.cpp.
References QList< T >::append(), d, filters, it, nameFilters(), NoFilter, NoSort, ret, SortByMask, and Unsorted.
QStringList QDir::entryList | ( | Filters | filters = NoFilter , |
SortFlags | sort = NoSort |
||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of the names of all the files and directories in the directory, ordered according to the name and attribute filters previously set with setNameFilters() and setFilter(), and sorted according to the flags set with setSorting().
The attribute filter and sorting specifications can be overridden using the filters and sort arguments.
Returns an empty list if the directory is unreadable, does not exist, or if nothing matches the specification.
Definition at line 1364 of file qdir.cpp.
References d, entryList(), and filters.
Referenced by allFilesInside(), codesignBundle(), deployPlugins(), entryList(), QQmlJS::Dom::DomUniverse::execQueue(), QGeoFileTileCacheOsm::getFromOfflineStorage(), QGeoFileTileCache::init(), recursiveCopy(), and recursiveCopyAndDeploy().
bool QDir::exists | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the directory exists; otherwise returns false
.
(If a file with the same name is found this function will return false).
The overload of this function that accepts an argument is used to test for the presence of files and directories within a directory.
Definition at line 1715 of file qdir.cpp.
References d_ptr, and QDirPrivate::exists().
Referenced by QGeoFileTileCacheOsm::QGeoFileTileCacheOsm(), QQmlTypeLoader::absoluteFilePath(), copyAndroidSources(), copyAndroidTemplate(), copyGradleTemplate(), QNetworkAccessFileBackendFactory::create(), createRcc(), QQmlTypeLoader::directoryExists(), existsAsSpecified(), iconTempPath(), QGeoFileTileCache::init(), main(), QSSGQmlUtilities::meshAssetName(), operator==(), QSSGQmlUtilities::outputTextureAsset(), packagePath(), QTest::qFindTestData(), readInputFile(), scanImports(), QFileSelectorPrivate::selectionHelper(), QQuickFileDialogImplPrivate::updateSelectedFile(), and QQuickFolderDialogImplPrivate::updateSelectedFolder().
bool QDir::exists | ( | const QString & | name | ) | const |
Returns true
if the file called name exists; otherwise returns false.
Unless name contains an absolute file path, the file name is assumed to be relative to the directory itself, so this function is typically used to check for the presence of files within a directory.
Definition at line 1945 of file qdir.cpp.
References QFileInfo::exists(), filePath(), and qWarning.
Returns the path name of a file in the directory.
Does not check if the file actually exists in the directory; but see exists(). If the QDir is relative the returned path name will also be relative. Redundant multiple separators or "." and ".." directories in fileName are not removed (see cleanPath()).
Definition at line 778 of file qdir.cpp.
References d, fileName, ret, and treatAsAbsolute().
Referenced by allFilesInside(), checkForDrmPermission(), copyAndroidExtraResources(), exists(), freeDesktopTrashLocation(), mkdir(), mkdir(), mkpath(), quick_test_main_with_setup(), remove(), removeRecursively(), rename(), rmdir(), rmpath(), and QFileInfo::setFile().
QDir::Filters QDir::filter | ( | ) | const |
Returns pathName using '/' as file separator. On Windows, for instance, fromNativeSeparators("\c{c:\\winnt\\system32}") returns "c:/winnt/system32".
The returned string may be the same as the argument on some operating systems, for example on Unix.
Definition at line 962 of file qdir.cpp.
References QString::replace().
Referenced by QTemporaryFileName::QTemporaryFileName(), QZipWriter::addDirectory(), QZipWriter::addFile(), QZipWriter::addFile(), QZipWriter::addSymLink(), buildAndroidProject(), convertCharArray(), copyQtFiles(), QQuickFolderBreadcrumbBarPrivate::crumbPathsForFolder(), QFileSystemModelPrivate::filePath(), QZipPrivate::fillFileInfo(), QSslCertificate::fromPath(), QFileSystemModelPrivate::name(), Recognizer::nextToken(), QFileSystemModelPrivate::node(), QLibraryInfoPrivate::path(), qt_cleanPath(), readInputFile(), QDirPrivate::setPath(), and QFileSystemModel::setRootPath().
|
inlinestatic |
Returns the user's home directory.
The directory is constructed using the absolute path of the home directory, ensuring that its path() will be the same as its absolutePath().
See homePath() for details.
Definition at line 219 of file qdir.h.
Referenced by checkForDrmPermission(), and freeDesktopTrashLocation().
|
static |
Returns the absolute path of the user's home directory.
Under Windows this function will return the directory of the current user's profile. Typically, this is:
Use the toNativeSeparators() function to convert the separators to the ones that are appropriate for the underlying operating system.
If the directory of the current user's profile does not exist or cannot be retrieved, the following alternatives will be checked (in the given order) until an existing and available path is found:
\list 1
USERPROFILE
environment variable. HOMEDRIVE
and HOMEPATH
environment variables. HOME
environment variable. SystemDrive
environment variable)
{C:/} directory. \endlistUnder non-Windows operating systems the HOME
environment variable is used if it exists, otherwise the path returned by the rootPath().
Definition at line 2100 of file qdir.cpp.
References QFileSystemEngine::homePath().
Referenced by QFileDialogPrivate::_q_goHome(), baseWritableLocation(), QFileDialogPrivate::createWidgets(), QMediaStorageLocation::defaultDirectory(), QMacSettingsPrivate::fileName(), make_user_path_without_qstandard_paths(), startQtAndroidPlugin(), wrapInFunction(), and QGenericUnixTheme::xdgIconThemePaths().
|
inline |
Returns true
if the directory's path is absolute; otherwise returns false
.
See isAbsolutePath().
Definition at line 185 of file qdir.h.
References isRelative().
|
inlinestatic |
Returns true
if path is absolute; returns false
if it is relative.
Definition at line 183 of file qdir.h.
Referenced by QQmlComponent::QQmlComponent(), addFontToDatabase(), cd(), QGuiApplicationPrivate::createPlatformIntegration(), QTemporaryDir::filePath(), QIcon::fromTheme(), QUrl::fromUserInput(), QQmlComponentPrivate::loadUrl(), parseOtoolLibraryLine(), and resolveDyldPrefix().
bool QDir::isEmpty | ( | Filters | filters = Filters(AllEntries | NoDotAndDotDot) | ) | const |
Returns whether the directory is empty.
Equivalent to {count() == 0} with filters
{QDir::AllEntries | QDir::NoDotAndDotDot}, but faster as it just checks whether the directory contains at least one entry.
{QDir::NoDotAndDotDot} (as the default value does), no directory is empty.Definition at line 1967 of file qdir.cpp.
References d, filters, and it.
Referenced by QFileDialog::setDirectory().
bool QDir::isReadable | ( | ) | const |
Returns true
if the directory is readable and we can open files by name; otherwise returns false
.
Definition at line 1683 of file qdir.cpp.
References d, QAbstractFileEngine::DirectoryType, QFileSystemEngine::fillMetaData(), info, QAbstractFileEngine::PermsMask, QFileDevice::ReadUser, QAbstractFileEngine::ReadUserPerm, and QFileSystemMetaData::UserReadPermission.
Referenced by findFileRecursion().
bool QDir::isRelative | ( | ) | const |
Returns true
if the directory path is relative; otherwise returns false.
(Under Unix a path is relative if it does not start with a "/").
Definition at line 1773 of file qdir.cpp.
References d_ptr, QDirPrivate::dirEntry, QDirPrivate::fileEngine, and QFileSystemEntry::isRelative().
|
static |
Returns true
if path is relative; returns false
if it is absolute.
Definition at line 2409 of file qdir.cpp.
References QFileInfo::isRelative().
Referenced by getLibraryProjectsInOutputFolder(), QQmlTypeLoader::getQmldir(), QQmlTypeLoader::getScript(), QQmlTypeLoader::getType(), makeAbsolute(), QLibraryInfoPrivate::path(), relativeFilePath(), QFileDialog::selectFile(), and QCocoaFileDialogHelper::selectFile().
bool QDir::isRoot | ( | ) | const |
Returns true
if the directory is the root directory; otherwise returns false
.
false
. If you want to test for this use canonicalPath(), e.g.Definition at line 1732 of file qdir.cpp.
References d_ptr, QDirPrivate::dirEntry, QDirPrivate::fileEngine, QAbstractFileEngine::FlagsMask, QFileSystemEntry::isRoot(), and QAbstractFileEngine::RootFlag.
|
inlinestaticconstexprnoexcept |
Returns the native path list separator: ':' under Unix and ';' under Windows.
Definition at line 197 of file qdir.h.
Referenced by QmlLsp::QQmlCodeModel::buildPathsForFileUrl(), QStandardPaths::findExecutable(), main(), parseEnvPath(), pythonRoot(), and runMoc().
bool QDir::makeAbsolute | ( | ) |
Converts the directory path to an absolute path.
If it is already absolute nothing happens. Returns true
if the conversion succeeded; otherwise returns false
.
Definition at line 1788 of file qdir.cpp.
References absoluteFilePath(), QAbstractFileEngine::AbsoluteName, absolutePath(), QSharedDataPointer< T >::constData(), d, d_ptr, dir, and isRelativePath().
bool QDir::mkdir | ( | const QString & | dirName | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates a sub-directory called dirName with default permissions.
On POSIX systems the default is to grant all permissions allowed by umask
. On Windows, the new directory inherits its permissions from its parent directory.
Definition at line 1527 of file qdir.cpp.
References QFileSystemEngine::createDirectory(), d, dirName(), filePath(), QString::isEmpty(), and qWarning.
Referenced by freeDesktopTrashLocation(), QSSGQmlUtilities::meshAssetName(), QSSGQmlUtilities::outputTextureAsset(), and QNetworkDiskCachePrivate::prepareLayout().
bool QDir::mkdir | ( | const QString & | dirName, |
QFile::Permissions | permissions | ||
) | const |
Creates a sub-directory called dirName.
Returns true
on success; otherwise returns false
.
If the directory already exists when this function is called, it will return false
.
The permissions of the created directory are set to {permissions}.
On POSIX systems the permissions are influenced by the value of umask
.
On Windows the permissions are emulated using ACLs. These ACLs may be in non-canonical order when the group is granted less permissions than others. Files and directories with such permissions will generate warnings when the Security tab of the Properties dialog is opened. Granting the group all permissions granted to others avoids such warnings.
Definition at line 1505 of file qdir.cpp.
References QFileSystemEngine::createDirectory(), d, dirName(), filePath(), QString::isEmpty(), and qWarning.
bool QDir::mkpath | ( | const QString & | dirPath | ) | const |
Creates the directory path dirPath.
The function will create all parent directories necessary to create the directory.
Returns true
if successful; otherwise returns false
.
If the path already exists when this function is called, it will return true.
Definition at line 1579 of file qdir.cpp.
References QFileSystemEngine::createDirectory(), d, filePath(), QString::isEmpty(), and qWarning.
Referenced by QAbstractGeoTileCache::baseCacheDirectory(), copyFiles(), createQtConf(), ensureWritableDir(), ensureWritableDir(), QZipReader::extractAll(), iconTempPath(), QGeoFileTileCache::init(), QGeoFileTileCacheOsm::init(), QV4::ExecutableCompilationUnit::localCacheFilePath(), QNetworkDiskCachePrivate::prepareLayout(), qt_ensureWritableDir(), recursiveCopy(), recursiveCopyAndDeploy(), and QMediaPlayerPrivate::setMedia().
QStringList QDir::nameFilters | ( | ) | const |
Returns the string list set by setNameFilters()
Definition at line 1050 of file qdir.cpp.
References d.
Referenced by entryInfoList(), entryList(), and setNameFilters().
|
static |
Returns a list of name filters from the given nameFilter. (If there is more than one filter, each pair of filters is separated by a space or by a semicolon.)
Definition at line 2438 of file qdir.cpp.
References QDirPrivate::splitFilters().
|
inline |
Returns true
if directory dir and this directory have different paths or different sort or filter settings; otherwise returns false.
Example:
Definition at line 189 of file qdir.h.
References dir, and operator==().
bool QDir::operator== | ( | const QDir & | dir | ) | const |
Returns true
if directory dir and this directory have the same path and their sort and filter settings are the same; otherwise returns false
.
Example:
Definition at line 1817 of file qdir.cpp.
References canonicalPath(), Qt::CaseInsensitive, Qt::CaseSensitive, QString::compare(), QString::constData(), d, dir, exists(), QFileSystemEngine::isCaseSensitive(), and other().
Returns the file name at position pos in the list of file names.
Equivalent to entryList().at(index). pos must be a valid index position in the list (i.e., 0 <= pos < count()).
{int}, not
{qsizetype}.QString QDir::path | ( | ) | const |
Returns the path.
This may contain symbolic links, but never contains redundant ".", ".." or multiple separators.
The returned path can be either absolute or relative (see setPath()).
Definition at line 653 of file qdir.cpp.
References d.
Referenced by QIconTheme::QIconTheme(), addSearchPath(), copyFiles(), findQmlDirectory(), freeDesktopTrashLocation(), main(), QSSGQmlUtilities::meshAssetName(), QFileSystemModelPrivate::node(), QSSGQmlUtilities::outputTextureAsset(), removeRecursively(), and QFileDialog::selectFile().
void QDir::refresh | ( | ) | const |
Refreshes the directory information.
Definition at line 2417 of file qdir.cpp.
References d, and QDirPrivate::IncludingMetaData.
Returns the path to fileName relative to the directory.
Definition at line 843 of file qdir.cpp.
References absolutePath(), Qt::CaseInsensitive, QStringView::chop(), cleanPath(), QStringView::compare(), dir, file, fileName, QString::isEmpty(), isRelativePath(), QFile::remove(), QString::remove(), QString::size(), Qt::SkipEmptyParts, QString::startsWith(), QString::tokenize(), and QString::toLower().
Referenced by allFilesInside(), changeInstallName(), combinePath(), deployRPaths(), loadTzTimeZones(), qRelocateResourceFile(), updateFile(), and writeDependencyFile().
bool QDir::remove | ( | const QString & | fileName | ) |
Removes the file, fileName.
Returns true
if the file is removed successfully; otherwise returns false
.
Definition at line 1897 of file qdir.cpp.
References fileName, filePath(), qWarning, and QFile::remove().
Referenced by QGeoFileTileCache::init().
bool QDir::removeRecursively | ( | ) |
Returns true
if successful, otherwise false.
If a file or directory cannot be removed, removeRecursively() keeps going and attempts to delete as many files and sub-directories as possible, then returns false
.
If the directory was already removed, the method returns true
(expected result already reached).
Definition at line 1640 of file qdir.cpp.
References absolutePath(), AllEntries, d_ptr, QDirPrivate::exists(), fi, QDirIterator::filePath(), filePath(), QDirIterator::hasNext(), Hidden, QFileInfo::isDir(), QFileInfo::isSymLink(), QDirIterator::nextFileInfo(), NoDotAndDotDot, ok, path(), QFile::permissions(), QFile::remove(), removeRecursively(), rmdir(), QFile::setPermissions(), System, and QFileDevice::WriteUser.
Referenced by createRcc(), QGeoFileTileCache::init(), QTemporaryDir::remove(), QFileSystemModel::remove(), and removeRecursively().
Renames a file or directory from oldName to newName, and returns true if successful; otherwise returns false
.
On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. However, there are also other reasons why rename() can fail. For example, on at least one file system rename() fails if newName points to an open file.
If oldName is a file (not a directory) that can't be renamed right away, Qt will try to copy oldName to newName and remove oldName.
Definition at line 1922 of file qdir.cpp.
References QFile::exists(), file, filePath(), QString::isEmpty(), qWarning, and QFile::rename().
bool QDir::rmdir | ( | const QString & | dirName | ) | const |
Removes the directory specified by dirName.
The directory must be empty for rmdir() to succeed.
Returns true
if successful; otherwise returns false
.
Definition at line 1551 of file qdir.cpp.
References d, dirName(), filePath(), QString::isEmpty(), qWarning, and QFileSystemEngine::removeDirectory().
Referenced by removeRecursively(), and QFileSystemModel::rmdir().
bool QDir::rmpath | ( | const QString & | dirPath | ) | const |
Removes the directory path dirPath.
The function will remove all parent directories in dirPath, provided that they are empty. This is the opposite of mkpath(dirPath).
Returns true
if successful; otherwise returns false
.
Definition at line 1605 of file qdir.cpp.
References d, filePath(), QString::isEmpty(), qWarning, and QFileSystemEngine::removeDirectory().
|
inlinestatic |
Returns the root directory.
The directory is constructed using the absolute path of the root directory, ensuring that its path() will be the same as its absolutePath().
See rootPath() for details.
Definition at line 221 of file qdir.h.
Referenced by QGeoMappingManagerEngineMapboxGL::QGeoMappingManagerEngineMapboxGL(), QAbstractGeoTileCache::baseCacheDirectory(), ensureWritableDir(), ensureWritableDir(), QZipReader::extractAll(), QGeoFileTileCache::init(), QGeoFileTileCacheOsm::init(), QV4::ExecutableCompilationUnit::localCacheFilePath(), qt_ensureWritableDir(), SharedImageProvider::requestImage(), and wrapInFunction().
|
static |
Returns the absolute path of the root directory.
For Unix operating systems this returns "/". For Windows file systems this normally returns "c:/".
Definition at line 2156 of file qdir.cpp.
References QFileSystemEngine::rootPath().
Referenced by QQmlEngine::baseUrl(), QFileSystemModelPrivate::node(), and wrapInFunction().
|
static |
Returns the search paths for prefix.
Definition at line 1156 of file qdir.cpp.
References lock.
Referenced by _q_resolveEntryAndCreateLegacyEngine_recursive().
|
inlinestatic |
Returns the native directory separator: "/" under Unix and "\\" under Windows.
You do not need to use this function to build file paths. If you always use "/", Qt will translate your paths to conform to the underlying operating system. If you want to display paths to the user using their operating system's separator use toNativeSeparators().
Definition at line 206 of file qdir.h.
Referenced by QConfFileSettingsPrivate::QConfFileSettingsPrivate(), QCompleterPrivate::_q_complete(), QFileDialogPrivate::_q_createDirectory(), QFseventsFileSystemWatcherEngine::addPaths(), QFileDialogPrivate::basename(), QQmlEngine::baseUrl(), QSSGQmlUtilities::copyTextureAsset(), createDirectoryWithParents(), QQmlJSLinter::defaultPluginPath(), QFileSystemModel::dropMimeData(), QZipReader::extractAll(), fileFromPath(), QFileSystemModelPrivate::filePath(), QCompletionEngine::filterHistory(), AssimpImporter::import(), initDefaultPaths(), QTextDocument::loadResource(), QSSGQmlUtilities::meshAssetName(), QFileSystemModel::mkdir(), QQmlEnginePrivate::offlineStorageDatabaseDirectory(), QQmlEngine::offlineStoragePath(), QSSGQmlUtilities::outputTextureAsset(), QCompleter::pathFromIndex(), QFseventsFileSystemWatcherEngine::processEvent(), QFileSystemEngine::removeDirectory(), QFseventsFileSystemWatcherEngine::removePaths(), QTextBrowserPrivate::resolveUrl(), runMoc(), QFileSystemModel::setData(), QSettings::setPath(), shellQuote(), QCompleter::splitPath(), JsonOutput::toList(), QFileDialogPrivate::typedFiles(), and QSSGQmlUtilities::writeQmlForAnimation().
|
static |
Sets the application's current working directory to path.
Returns true
if the directory was successfully changed; otherwise returns false
.
Definition at line 2027 of file qdir.cpp.
References QFileSystemEngine::setCurrentPath().
Referenced by QIOSIntegration::QIOSIntegration(), buildAndroidProject(), createRcc(), createSymbolicLink(), QQmlDataTest::initTestCase(), Q_TRACE_INSTRUMENT(), runProcess(), startQtAndroidPlugin(), and wrapInFunction().
void QDir::setFilter | ( | Filters | filters | ) |
Sets the filter used by entryList() and entryInfoList() to filters.
The filter is used to specify the kind of files that should be returned by entryList() and entryInfoList(). See \l{QDir::Filter}.
Definition at line 1250 of file qdir.cpp.
References d, filters, and QDirPrivate::KeepMetaData.
void QDir::setNameFilters | ( | const QStringList & | nameFilters | ) |
Sets the name filters used by entryList() and entryInfoList() to the list of filters specified by nameFilters.
Each name filter is a wildcard (globbing) filter that understands {*} and
{?} wildcards. See \l{QRegularExpression::fromWildcard()}.
For example, the following code sets three name filters on a QDir to ensure that only files with extensions typically used for C++ source files are listed:
Definition at line 1071 of file qdir.cpp.
References d, QDirPrivate::KeepMetaData, and nameFilters().
Referenced by QTlsPrivate::systemCaCertificates().
Sets the path of the directory to path.
The path is cleaned of redundant ".", ".." and of multiple separators. No check is made to see whether a directory with this path actually exists; but you can check for yourself using exists().
The path can be either absolute or relative. Absolute paths begin with the directory separator "/" (optionally preceded by a drive specification under Windows). Relative file names begin with a directory name or a file name and specify a path relative to the current directory. An example of an absolute path is the string "/tmp/quartz", a relative path might look like "src/fatlib".
Definition at line 638 of file qdir.cpp.
References d_ptr, and QDirPrivate::setPath().
Referenced by QTlsPrivate::systemCaCertificates().
|
static |
Sets or replaces Qt's search paths for file names with the prefix prefix to searchPaths.
To specify a prefix for a file name, prepend the prefix followed by a single colon (e.g., "images:undo.png", "xmldocs:books.xml"). prefix can only contain letters or numbers (e.g., it cannot contain a colon, nor a slash).
Qt uses this search path to locate files with a known prefix. The search path entries are tested in order, starting with the first entry.
File name prefix must be at least 2 characters long to avoid conflicts with Windows drive letters.
Search paths may contain paths to \l{The Qt Resource System}.
Definition at line 1109 of file qdir.cpp.
References ch, lock, and qWarning.
Referenced by wrapInFunction().
void QDir::setSorting | ( | SortFlags | sort | ) |
Sets the sort order used by entryList() and entryInfoList().
The sort is specified by OR-ing values from the enum \l{QDir::SortFlag}.
Definition at line 1305 of file qdir.cpp.
References d, and QDirPrivate::KeepMetaData.
QDir::SortFlags QDir::sorting | ( | ) | const |
Returns the value set by setSorting()
Definition at line 1262 of file qdir.cpp.
References d.
|
inlinestatic |
Returns the system's temporary directory.
The directory is constructed using the absolute canonical path of the temporary directory, ensuring that its path() will be the same as its absolutePath().
See tempPath() for details.
|
static |
Returns the absolute canonical path of the system's temporary directory.
On Unix/Linux systems this is the path in the TMPDIR
environment variable or {/tmp} if
TMPDIR
is not defined. On Windows this is usually the path in the TEMP
or TMP
environment variable. The path returned by this method doesn't end with a directory separator unless it is the root directory (of a drive).
Definition at line 2130 of file qdir.cpp.
References QFileSystemEngine::tempPath().
Referenced by QQuickSpriteEngine::assembledImage(), baseWritableLocation(), QTlsPrivate::TlsCryptographOpenSSL::continueHandshake(), QFile::copy(), QMediaStorageLocation::defaultDirectory(), defaultTemplateName(), QTemporaryFilePrivate::defaultTemplateName(), iconTempPath(), QMediaPlayerPrivate::setMedia(), tempFilePattern(), and tempFilePattern().
Returns pathName with the '/' separators converted to separators that are appropriate for the underlying operating system.
On Windows, toNativeSeparators("c:/winnt/system32") returns "c:\\winnt\\system32".
The returned string may be the same as the argument on some operating systems, for example on Unix.
Definition at line 929 of file qdir.cpp.
References i, and QString::indexOf().
Referenced by QFileDialogPrivate::_q_pathChanged(), absoluteFilePath(), QFileDialogPrivate::basename(), canonicalPath(), checkWarnMessage(), compilerRunTimeLibs(), QWindowsMimeURI::convertFromMime(), createChangeNotification(), createDirectory(), createSymbolicLink(), deploy(), deployPlugin(), deployTranslations(), deployWebEngineCore(), QWindowsXpNativeFileDialog::existingDirCallback(), QWindowsFileIconEngine::filePixmap(), QCompletionEngine::filterHistory(), findDependentQtLibraries(), findSharedLibraries(), getDevice(), handleCompileErrors(), QFileDialog::history(), init_platform(), loadRulesFromFile(), main(), main(), Option::messagePrefix(), msgFileDoesNotExist(), msgFindNextFailed(), msgInvalidElfObject(), QSaveFile::open(), QQmlLocalStorage::openDatabaseSync(), operator<<(), parseEarlyArguments(), patchQtCore(), prefixMessage(), QTest::qFindTestData(), qtestFixUrl(), queryQtPaths(), quick_test_main_with_setup(), readElfExecutable(), readGpuFeatures(), QTemporaryDir::remove(), QFile::rename(), QFileSystemModel::setData(), QUrlModel::setData(), QFileDialogComboBox::setHistory(), shellExecute(), QWindowsNativeFileDialogBase::shellItem(), QCompleter::splitPath(), JsonOutput::toJson(), JsonOutput::toList(), updateFile(), updateFile(), and vcRedistDir().
|
friend |
|
protected |
Definition at line 237 of file qdir.h.
Referenced by cd(), dirName(), exists(), isRelative(), isRoot(), makeAbsolute(), operator=(), removeRecursively(), and setPath().