Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QDirPrivate Class Reference

#include <qdir_p.h>

+ Inheritance diagram for QDirPrivate:
+ Collaboration diagram for QDirPrivate:

Classes

struct  FileCache
 

Public Types

enum  PathNormalization { DefaultNormalization = 0x00 , AllowUncPaths = 0x01 , RemotePath = 0x02 }
 
enum  MetaDataClearing { KeepMetaData , IncludingMetaData }
 

Public Member Functions

 QDirPrivate (const QString &path, const QStringList &nameFilters_=QStringList(), QDir::SortFlags sort_=QDir::SortFlags(QDir::Name|QDir::IgnoreCase), QDir::Filters filters_=QDir::AllEntries)
 
 QDirPrivate (const QDirPrivate &copy)
 
bool exists () const
 
void initFileLists (const QDir &dir) const
 
void setPath (const QString &path)
 
void clearCache (MetaDataClearing mode)
 
QString resolveAbsoluteEntry () const
 
- Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
 
QSharedDataoperator= (const QSharedData &)=delete
 
 ~QSharedData ()=default
 

Static Public Member Functions

static void sortFileList (QDir::SortFlags, const QFileInfoList &, QStringList *, QFileInfoList *)
 
static QChar getFilterSepChar (const QString &nameFilter)
 
static QStringList splitFilters (const QString &nameFilter, QChar sep={})
 

Public Attributes

QStringList nameFilters
 
QDir::SortFlags sort
 
QDir::Filters filters
 
std::unique_ptr< QAbstractFileEnginefileEngine
 
QFileSystemEntry dirEntry
 
FileCache fileCache
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Definition at line 27 of file qdir_p.h.

Member Enumeration Documentation

◆ MetaDataClearing

Enumerator
KeepMetaData 
IncludingMetaData 

Definition at line 56 of file qdir_p.h.

◆ PathNormalization

Enumerator
DefaultNormalization 
AllowUncPaths 
RemotePath 

Definition at line 30 of file qdir_p.h.

Constructor & Destructor Documentation

◆ QDirPrivate() [1/2]

QDirPrivate::QDirPrivate ( const QString & path,
const QStringList & nameFilters_ = QStringList(),
QDir::SortFlags sort_ = QDir::SortFlags(QDir::Name | QDir::IgnoreCase),
QDir::Filters filters_ = QDir::AllEntries )
explicit

Definition at line 82 of file qdir.cpp.

References QString::fromLatin1(), nameFilters, and setPath().

+ Here is the call graph for this function:

◆ QDirPrivate() [2/2]

QDirPrivate::QDirPrivate ( const QDirPrivate & copy)
explicit

Definition at line 94 of file qdir.cpp.

References QDirPrivate::FileCache::absoluteDirEntry, copy(), fileCache, QDirPrivate::FileCache::fileInfos, QDirPrivate::FileCache::fileListsInitialized, QDirPrivate::FileCache::files, and QDirPrivate::FileCache::metaData.

+ Here is the call graph for this function:

Member Function Documentation

◆ clearCache()

void QDirPrivate::clearCache ( MetaDataClearing mode)
inline

Definition at line 358 of file qdir.cpp.

References QFileSystemMetaData::clear(), QList< T >::clear(), QFileSystemEngine::createLegacyEngine(), dirEntry, fileCache, fileEngine, QDirPrivate::FileCache::fileInfos, QDirPrivate::FileCache::fileListsInitialized, QDirPrivate::FileCache::files, IncludingMetaData, QDirPrivate::FileCache::metaData, and QDirPrivate::FileCache::mutex.

Referenced by QDir::refresh(), and setPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exists()

bool QDirPrivate::exists ( ) const

Definition at line 111 of file qdir.cpp.

References QAbstractFileEngine::DirectoryType, QFileSystemMetaData::DirectoryType, dirEntry, QFileSystemMetaData::exists(), QFileSystemMetaData::ExistsAttribute, QAbstractFileEngine::ExistsFlag, fileCache, fileEngine, QFileSystemEngine::fillMetaData(), info, QFileSystemMetaData::isDirectory(), QDirPrivate::FileCache::metaData, QDirPrivate::FileCache::mutex, and QAbstractFileEngine::Refresh.

Referenced by QDir::exists(), and QDir::removeRecursively().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFilterSepChar()

QChar QDirPrivate::getFilterSepChar ( const QString & nameFilter)
inlinestatic

Definition at line 131 of file qdir.cpp.

References i, QString::indexOf(), and sep.

Referenced by splitFilters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFileLists()

void QDirPrivate::initFileLists ( const QDir & dir) const
inline

Definition at line 345 of file qdir.cpp.

References dir, dirEntry, QList< T >::emplace_back(), fileCache, QDirPrivate::FileCache::fileInfos, QDirPrivate::FileCache::fileListsInitialized, QDirPrivate::FileCache::files, QDirPrivate::FileCache::mutex, sort, and sortFileList().

+ Here is the call graph for this function:

◆ resolveAbsoluteEntry()

QString QDirPrivate::resolveAbsoluteEntry ( ) const
inline

Definition at line 167 of file qdir.cpp.

References QDirPrivate::FileCache::absoluteDirEntry, QAbstractFileEngine::AbsoluteName, QFileSystemEngine::absoluteName(), QDir::cleanPath(), dirEntry, fileCache, fileEngine, QFileSystemEntry::filePath(), QFileSystemEntry::isClean(), QFileSystemEntry::isEmpty(), QFileSystemEntry::isRelative(), and QDirPrivate::FileCache::mutex.

+ Here is the call graph for this function:

◆ setPath()

void QDirPrivate::setPath ( const QString & path)
inline

Definition at line 151 of file qdir.cpp.

References QDirPrivate::FileCache::absoluteDirEntry, clearCache(), dirEntry, fileCache, QDir::fromNativeSeparators(), and IncludingMetaData.

Referenced by QDirPrivate(), and QDir::setPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sortFileList()

void QDirPrivate::sortFileList ( QDir::SortFlags sort,
const QFileInfoList & l,
QStringList * names,
QFileInfoList * infos )
inlinestatic

Definition at line 296 of file qdir.cpp.

References QList< T >::append(), QList< T >::at(), i, QList< T >::isEmpty(), QDir::LocaleAware, Q_ASSERT, QList< T >::size(), sort, QDir::SortByMask, and QDir::Unsorted.

Referenced by initFileLists().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ splitFilters()

QStringList QDirPrivate::splitFilters ( const QString & nameFilter,
QChar sep = {} )
inlinestatic

Definition at line 141 of file qdir.cpp.

References getFilterSepChar(), qTokenize(), ret, and sep.

Referenced by QDir::nameFiltersFromString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ dirEntry

QFileSystemEntry QDirPrivate::dirEntry

◆ fileCache

FileCache QDirPrivate::fileCache
mutable

Definition at line 78 of file qdir_p.h.

Referenced by QDirPrivate(), clearCache(), exists(), initFileLists(), resolveAbsoluteEntry(), and setPath().

◆ fileEngine

std::unique_ptr<QAbstractFileEngine> QDirPrivate::fileEngine

◆ filters

QDir::Filters QDirPrivate::filters

Definition at line 63 of file qdir_p.h.

◆ nameFilters

QStringList QDirPrivate::nameFilters

Definition at line 61 of file qdir_p.h.

Referenced by QDirPrivate().

◆ sort

QDir::SortFlags QDirPrivate::sort

Definition at line 62 of file qdir_p.h.

Referenced by initFileLists(), and sortFileList().


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