Qt:Документация 4.3.2/qdir-qt3

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Qt 3 Support Members for QDir

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.



[править] Открытые функции

  • 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 )

[править] Статические открытые члены


[править] Описание функций-членов

[править]
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.

[править]
QString QDir::cleanDirPath ( const QString & name ) [static]

Use cleanPath() instead.

[править]
void QDir::convertToAbs ()

Use makeAbsolute() instead.

[править]
QString QDir::currentDirPath () [static]

Returns the absolute path of the application's current directory.

Use currentPath() instead.

See also currentPath().

[править]
QFileInfoList QDir::entryInfoList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const

This is an overloaded member function, provided for convenience.

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 member function, provided for convenience.

Use the overload that takes a name filter string list as first argument instead of a combination of attribute filter flags.

[править]
QString QDir::homeDirPath () [static]

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

This is an overloaded member function, provided for convenience.

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

This is an overloaded member function, provided for convenience.

Use rmdir(dirName) instead.

The acceptAbsPath parameter is ignored.

[править]
QString QDir::rootDirPath () [static]

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().


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2