- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes

# QDir Class Reference

Search for all occurrences

## Detailed Description

Examples:

  MeshDisplace/displacer.cpp, SampleViewportFilter/SampleViewportFilter.cpp, TextureConveyor/TextureConveyor.cpp, and ToonMaterial/ToonMaterial.cpp.

Definition at line 58 of file qdir.h.

`#include <qdir.h>`

List of all members.

## 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, NoDotAndDotDot = 0x1000, NoDot = 0x2000, NoDotDot = 0x4000, NoFilter = -1 }
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 }
## Public Member Functions
| QDir (const QDir &)
| QDir (const QString &path=QString())
| QDir (const QString &path, const QString &nameFilter, SortFlags sort=SortFlags(Name|IgnoreCase), Filters filter=AllEntries)
| ~QDir ()
QDir & | operator= (const QDir &)
QDir & | operator= (const QString &path)
void | setPath (const QString &path)
QString | path () const
QString | absolutePath () const
QString | canonicalPath () const
QString | dirName () const
QString | filePath (const QString &fileName) const
QString | absoluteFilePath (const QString &fileName) const
QString | relativeFilePath (const QString &fileName) const
bool | cd (const QString &dirName)
bool | cdUp ()
QStringList | nameFilters () const
void | setNameFilters (const QStringList &nameFilters)
Filters | filter () const
void | setFilter (Filters filter)
SortFlags | sorting () const
void | setSorting (SortFlags sort)
uint | count () const
QString | operator[] (int) const
QStringList | entryList (Filters filters=NoFilter, SortFlags sort=NoSort) const
QStringList | entryList (const QStringList &nameFilters, Filters filters=NoFilter, SortFlags sort=NoSort) const
QFileInfoList | entryInfoList (Filters filters=NoFilter, SortFlags sort=NoSort) const
QFileInfoList | entryInfoList (const QStringList &nameFilters, Filters filters=NoFilter, SortFlags sort=NoSort) const
bool | mkdir (const QString &dirName) const
bool | rmdir (const QString &dirName) const
bool | mkpath (const QString &dirPath) const
bool | rmpath (const QString &dirPath) const
bool | isReadable () const
bool | exists () const
bool | isRoot () const
bool | isRelative () const
bool | isAbsolute () const
bool | makeAbsolute ()
bool | operator== (const QDir &dir) const
bool | operator!= (const QDir &dir) const
bool | remove (const QString &fileName)
bool | rename (const QString &oldName, const QString &newName)
bool | exists (const QString &name) const
void | refresh () const
## Static Public Member Functions
static void | addResourceSearchPath (const QString &path)
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)
static bool | isAbsolutePath (const QString &path)
static QFileInfoList | drives ()
static QChar | separator ()
static bool | setCurrent (const QString &path)
static QDir | current ()
static QString | currentPath ()
static QDir | home ()
static QString | homePath ()
static QDir | root ()
static QString | rootPath ()
static QDir | temp ()
static QString | tempPath ()
static bool | match (const QStringList &filters, const QString &fileName)
static bool | match (const QString &filter, const QString &fileName)
static QString | cleanPath (const QString &path)
## Protected Attributes
QSharedDataPointer< QDirPrivate > | d_ptr

## Member Enumeration Documentation

enum Filter

Search for all occurrences

Enumerator:

  Dirs | Search for all occurrences
  Files | Search for all occurrences
  Drives | Search for all occurrences
  NoSymLinks | Search for all occurrences
  AllEntries | Search for all occurrences
  TypeMask | Search for all occurrences
  Readable | Search for all occurrences
  Writable | Search for all occurrences
  Executable | Search for all occurrences
  PermissionMask | Search for all occurrences
  Modified | Search for all occurrences
  Hidden | Search for all occurrences
  System | Search for all occurrences
  AccessMask | Search for all occurrences
  AllDirs | Search for all occurrences
  CaseSensitive | Search for all occurrences
  NoDotAndDotDot | Search for all occurrences
  NoDot | Search for all occurrences
  NoDotDot | Search for all occurrences
  NoFilter | Search for all occurrences

Definition at line 64 of file qdir.h.

                    { Dirs        = 0x001,
                      Files       = 0x002,
                      Drives      = 0x004,
                      NoSymLinks  = 0x008,
                      AllEntries  = Dirs | Files | Drives,
                      TypeMask    = 0x00f,
    #ifdef QT3_SUPPORT
                      All         = AllEntries,
    #endif

                      Readable    = 0x010,
                      Writable    = 0x020,
                      Executable  = 0x040,
                      PermissionMask    = 0x070,
    #ifdef QT3_SUPPORT
                      RWEMask     = 0x070,
    #endif

                      Modified    = 0x080,
                      Hidden      = 0x100,
                      System      = 0x200,

                      AccessMask  = 0x3F0,

                      AllDirs       = 0x400,
                      CaseSensitive = 0x800,
                      NoDotAndDotDot = 0x1000, // ### Qt5 NoDotAndDotDot = NoDot|NoDotDot
                      NoDot         = 0x2000,
                      NoDotDot      = 0x4000,

                      NoFilter = -1
    #ifdef QT3_SUPPORT
                      ,DefaultFilter = NoFilter
    #endif
        };

enum SortFlag

Search for all occurrences

Enumerator:

  Name | Search for all occurrences
  Time | Search for all occurrences
  Size | Search for all occurrences
  Unsorted | Search for all occurrences
  SortByMask | Search for all occurrences
  DirsFirst | Search for all occurrences
  Reversed | Search for all occurrences
  IgnoreCase | Search for all occurrences
  DirsLast | Search for all occurrences
  LocaleAware | Search for all occurrences
  Type | Search for all occurrences
  NoSort | Search for all occurrences

Definition at line 104 of file qdir.h.

                      { Name        = 0x00,
                        Time        = 0x01,
                        Size        = 0x02,
                        Unsorted    = 0x03,
                        SortByMask  = 0x03,

                        DirsFirst   = 0x04,
                        Reversed    = 0x08,
                        IgnoreCase  = 0x10,
                        DirsLast    = 0x20,
                        LocaleAware = 0x40,
                        Type        = 0x80,
                        NoSort = -1
    #ifdef QT3_SUPPORT
                      ,DefaultSort = NoSort
    #endif
        };

## Constructor & Destructor Documentation

QDir | ( | const QDir & |  | ) |

QDir | ( | const QString & | path = `QString()` | ) |

QDir | ( | const QString & | path,
|  | const QString & | nameFilter,
|  | SortFlags | sort = `SortFlags(Name|IgnoreCase)`,
|  | Filters | filter = `AllEntries`
| ) |  |

~QDir | ( |  | ) |

## Member Function Documentation

QDir& operator= | ( | const QDir & |  | ) |

QDir& operator= | ( | const QString & | path | ) |

void setPath | ( | const QString & | path | ) |

Search for all occurrences

QString path | ( |  | ) | const

Search for all occurrences

QString absolutePath | ( |  | ) | const

Search for all occurrences

Examples:
  TextureConveyor/TextureConveyor.cpp.

QString canonicalPath | ( |  | ) | const

Search for all occurrences

static void addResourceSearchPath | ( | const QString & | path | ) | `[static]`

Search for all occurrences

static void setSearchPaths | ( | const QString & | prefix,
|  | const QStringList & | searchPaths
| ) |  | `[static]`

Search for all occurrences

static void addSearchPath | ( | const QString & | prefix,
|  | const QString & | path
| ) |  | `[static]`

Search for all occurrences

static QStringList searchPaths | ( | const QString & | prefix | ) | `[static]`

Search for all occurrences

QString dirName | ( |  | ) | const

Search for all occurrences

QString filePath | ( | const QString & | fileName | ) | const

Search for all occurrences

Examples:
  MeshDisplace/displacer.cpp.

QString absoluteFilePath | ( | const QString & | fileName | ) | const

Search for all occurrences

QString relativeFilePath | ( | const QString & | fileName | ) | const

Search for all occurrences

static QString toNativeSeparators | ( | const QString & | pathName | ) | `[static]`

Search for all occurrences

static QString fromNativeSeparators | ( | const QString & | pathName | ) | `[static]`

Search for all occurrences

bool cd | ( | const QString & | dirName | ) |

Search for all occurrences

bool cdUp | ( |  | ) |

Search for all occurrences

QStringList nameFilters | ( |  | ) | const

Search for all occurrences

void setNameFilters | ( | const QStringList & | nameFilters | ) |

Search for all occurrences

Examples:
  MeshDisplace/displacer.cpp.

Filters filter | ( |  | ) | const

Search for all occurrences

void setFilter | ( | Filters | filter | ) |

Search for all occurrences

SortFlags sorting | ( |  | ) | const

Search for all occurrences

void setSorting | ( | SortFlags | sort | ) |

Search for all occurrences

uint count | ( |  | ) | const

Search for all occurrences

Examples:
  MeshDisplace/displacer.cpp.

QString operator[] | ( | int |  | ) | const

static QStringList nameFiltersFromString | ( | const QString & | nameFilter | ) | `[static]`

Search for all occurrences

QStringList entryList | ( | Filters | filters = `NoFilter`,
|  | SortFlags | sort = `NoSort`
| ) |  | const

Search for all occurrences

QStringList entryList | ( | const QStringList & | nameFilters,
|  | Filters | filters = `NoFilter`,
|  | SortFlags | sort = `NoSort`
| ) |  | const

Search for all occurrences

QFileInfoList entryInfoList | ( | Filters | filters = `NoFilter`,
|  | SortFlags | sort = `NoSort`
| ) |  | const

Search for all occurrences

QFileInfoList entryInfoList | ( | const QStringList & | nameFilters,
|  | Filters | filters = `NoFilter`,
|  | SortFlags | sort = `NoSort`
| ) |  | const

Search for all occurrences

bool mkdir | ( | const QString & | dirName | ) | const

Search for all occurrences

bool rmdir | ( | const QString & | dirName | ) | const

Search for all occurrences

bool mkpath | ( | const QString & | dirPath | ) | const

Search for all occurrences

Examples:
  TextureConveyor/TextureConveyor.cpp.

bool rmpath | ( | const QString & | dirPath | ) | const

Search for all occurrences

bool isReadable | ( |  | ) | const

Search for all occurrences

bool exists | ( |  | ) | const

Search for all occurrences

Examples:
  TextureConveyor/TextureConveyor.cpp.

bool isRoot | ( |  | ) | const

Search for all occurrences

static bool isRelativePath | ( | const QString & | path | ) | `[static]`

Search for all occurrences

static bool isAbsolutePath | ( | const QString & | path | ) | `[inline, static]`

Search for all occurrences

Definition at line 188 of file qdir.h.

    { return !isRelativePath(path); }

bool isRelative | ( |  | ) | const

Search for all occurrences

bool isAbsolute | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 190 of file qdir.h.

    { return !isRelative(); }

bool makeAbsolute | ( |  | ) |

Search for all occurrences

bool operator== | ( | const QDir & | dir | ) | const

bool operator!= | ( | const QDir & | dir | ) | const `[inline]`

Definition at line 194 of file qdir.h.

    {  return !operator==(dir); }

bool remove | ( | const QString & | fileName | ) |

Search for all occurrences

bool rename | ( | const QString & | oldName,
|  | const QString & | newName
| ) |  |

Search for all occurrences

bool exists | ( | const QString & | name | ) | const

Search for all occurrences

static QFileInfoList drives | ( |  | ) | `[static]`

Search for all occurrences

static QChar separator | ( |  | ) | `[static]`

Search for all occurrences

static bool setCurrent | ( | const QString & | path | ) | `[static]`

Search for all occurrences

static QDir current | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 205 of file qdir.h.

    { return QDir(currentPath()); }

static QString currentPath | ( |  | ) | `[static]`

Search for all occurrences

static QDir home | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 208 of file qdir.h.

    { return QDir(homePath()); }

static QString homePath | ( |  | ) | `[static]`

Search for all occurrences

static QDir root | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 210 of file qdir.h.

    { return QDir(rootPath()); }

static QString rootPath | ( |  | ) | `[static]`

Search for all occurrences

static QDir temp | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 212 of file qdir.h.

    { return QDir(tempPath()); }

static QString tempPath | ( |  | ) | `[static]`

Search for all occurrences

static bool match | ( | const QStringList & | filters,
|  | const QString & | fileName
| ) |  | `[static]`

Search for all occurrences

static bool match | ( | const QString & | filter,
|  | const QString & | fileName
| ) |  | `[static]`

Search for all occurrences

static QString cleanPath | ( | const QString & | path | ) | `[static]`

Search for all occurrences

void refresh | ( |  | ) | const

Search for all occurrences

## Member Data Documentation

QSharedDataPointer<QDirPrivate> d_ptr `[protected]`

Search for all occurrences

Definition at line 61 of file qdir.h.

The documentation for this class was generated from the following file:

- QtCore/qdir.h

QDir QDir QDir QDir QDir QDir QDir QDir QDir QDir
QDir QDir QDir QDir QDir QDir QDir QDir QDir QDir