Compatibility Members for QDir
The following members of class QDirare part of the Qt compatibility layer. We advise against using them in new code.
Public Functions
QString | absFilePath(const QString & fileName, bool acceptAbsPath = true) const |
QString | absPath() const |
void | convertToAbs() |
QFileInfoList | entryInfoList(const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort) const |
QStringList | entryList(const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort) const |
bool | matchAllDirs() const |
bool | mkdir(const QString & dirName, bool acceptAbsPath) const |
QString | nameFilter() const |
bool | rmdir(const QString & dirName, bool acceptAbsPath) const |
void | setMatchAllDirs(bool on) |
void | setNameFilter(const QString & nameFilter) |
Static Public Members
QString | cleanDirPath(const QString & name) |
QString | currentDirPath() |
QString | homeDirPath() |
QString | rootDirPath() |
Member Function Documentation
QString QDir::absFilePath(const QString & fileName, bool acceptAbsPath = true) const
Use absoluteFilePath(fileName) instead.
The acceptAbsPath parameter is ignored.
QString QDir::absPath() const
Use absolutePath() instead.
[static]
QString QDir::cleanDirPath(const QString & name)
Use cleanPath() instead.
void QDir::convertToAbs()
Use makeAbsolute() instead.
[static]
QString QDir::currentDirPath()
Returns the absolute path of the application's current directory.
Use currentPath() instead.
See also currentPath() and setCurrent().
QFileInfoList QDir::entryInfoList(const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort) const
This is an overloaded function.
Use the overload that takes a name filter string list as first argument instead of a combination of attribute filter flags.
QStringList QDir::entryList(const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort) const
This is an overloaded function.
Use the overload that takes a name filter string list as first argument instead of a combination of attribute filter flags.
[static]
QString QDir::homeDirPath()
Returns the absolute path of the user's home directory.
Use homePath() instead.
See also homePath().
bool QDir::matchAllDirs() const
Use filter() & AllDirs instead.
See also setMatchAllDirs().
bool QDir::mkdir(const QString & dirName, bool acceptAbsPath) const
Use mkdir(dirName) instead.
The acceptAbsPath parameter is ignored.
QString QDir::nameFilter() const
Use nameFilters() instead.
See also setNameFilter().
bool QDir::rmdir(const QString & dirName, bool acceptAbsPath) const
Use rmdir(dirName) instead.
The acceptAbsPath parameter is ignored.
[static]
QString QDir::rootDirPath()
Returns the absolute path of the root directory.
Use rootPath() instead.
See also rootPath().
void QDir::setMatchAllDirs(bool on)
Use setFilter() instead.
See also matchAllDirs().
void QDir::setNameFilter(const QString & nameFilter)
Use setNameFilters() instead.
The nameFilter is a wildcard (globbing) filter that understands "*" and "?" wildcards. (See QRegExp wildcard matching.) You may specify several filter entries, each separated by spaces or by semicolons.
For example, if you want entryList() and entryInfoList() to list all files ending with either ".cpp" or ".h", you would use either dir.setNameFilters("*.cpp *.h") or dir.setNameFilters("*.cpp;*.h").
For example, if you have code like
QString filter = "*.cpp *.cxx *.cc"; dir.setNameFilter(filter);
you can rewrite it as
QString filter = "*.cpp *.cxx *.cc"; dir.setNameFilters(filter.split(' '));
See also nameFilter().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.