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
QFileSystemEntry Class Reference

#include <qfilesystementry_p.h>

+ Collaboration diagram for QFileSystemEntry:

Classes

struct  FromInternalPath
 
struct  FromNativePath
 

Public Types

typedef QByteArray NativePath
 

Public Member Functions

Q_AUTOTEST_EXPORT QFileSystemEntry ()
 
Q_AUTOTEST_EXPORT QFileSystemEntry (const QString &filePath)
 
Q_AUTOTEST_EXPORT QFileSystemEntry (const QString &filePath, FromInternalPath dummy)
 
Q_AUTOTEST_EXPORT QFileSystemEntry (const NativePath &nativeFilePath, FromNativePath dummy)
 
Q_AUTOTEST_EXPORT QFileSystemEntry (const QString &filePath, const NativePath &nativeFilePath)
 
Q_AUTOTEST_EXPORT QString filePath () const
 
Q_AUTOTEST_EXPORT QString fileName () const
 
Q_AUTOTEST_EXPORT QString path () const
 
Q_AUTOTEST_EXPORT NativePath nativeFilePath () const
 
Q_AUTOTEST_EXPORT QString baseName () const
 
Q_AUTOTEST_EXPORT QString completeBaseName () const
 
Q_AUTOTEST_EXPORT QString suffix () const
 
Q_AUTOTEST_EXPORT QString completeSuffix () const
 
Q_AUTOTEST_EXPORT bool isAbsolute () const
 
Q_AUTOTEST_EXPORT bool isRelative () const
 
Q_AUTOTEST_EXPORT bool isClean () const
 
Q_AUTOTEST_EXPORT bool isRoot () const
 
Q_AUTOTEST_EXPORT bool isEmpty () const
 
void clear ()
 

Static Public Member Functions

static Q_CORE_EXPORT bool isRootPath (const QString &path)
 

Detailed Description

Definition at line 24 of file qfilesystementry_p.h.

Member Typedef Documentation

◆ NativePath

Definition at line 29 of file qfilesystementry_p.h.

Constructor & Destructor Documentation

◆ QFileSystemEntry() [1/5]

QFileSystemEntry::QFileSystemEntry ( )

Definition at line 44 of file qfilesystementry.cpp.

Referenced by clear().

+ Here is the caller graph for this function:

◆ QFileSystemEntry() [2/5]

QFileSystemEntry::QFileSystemEntry ( const QString & filePath)
explicit

Use this constructor when the path is supplied by user code, as it may contain a mix of '/' and the native separator.

Definition at line 56 of file qfilesystementry.cpp.

◆ QFileSystemEntry() [3/5]

QFileSystemEntry::QFileSystemEntry ( const QString & filePath,
FromInternalPath dummy )

Use this constructor when the path is guaranteed to be in internal format, i.e. all directory separators are '/' and not the native separator.

Definition at line 69 of file qfilesystementry.cpp.

◆ QFileSystemEntry() [4/5]

QFileSystemEntry::QFileSystemEntry ( const NativePath & nativeFilePath,
FromNativePath dummy )

Use this constructor when the path comes from a native API

Definition at line 81 of file qfilesystementry.cpp.

◆ QFileSystemEntry() [5/5]

QFileSystemEntry::QFileSystemEntry ( const QString & filePath,
const NativePath & nativeFilePath )

Definition at line 89 of file qfilesystementry.cpp.

Member Function Documentation

◆ baseName()

QString QFileSystemEntry::baseName ( ) const

Definition at line 164 of file qfilesystementry.cpp.

References QString::at(), QString::length(), and QString::mid().

Referenced by QFileInfo::baseName().

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

◆ clear()

void QFileSystemEntry::clear ( )
inline

Definition at line 64 of file qfilesystementry_p.h.

References QFileSystemEntry().

+ Here is the call graph for this function:

◆ completeBaseName()

QString QFileSystemEntry::completeBaseName ( ) const

Definition at line 180 of file qfilesystementry.cpp.

References QString::at(), QString::length(), and QString::mid().

Referenced by QFileInfo::completeBaseName().

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

◆ completeSuffix()

QString QFileSystemEntry::completeSuffix ( ) const

Definition at line 206 of file qfilesystementry.cpp.

References QString::mid(), and qMax().

+ Here is the call graph for this function:

◆ fileName()

QString QFileSystemEntry::fileName ( ) const

Definition at line 135 of file qfilesystementry.cpp.

References QString::at(), QString::length(), and QString::mid().

Referenced by QMimeDatabasePrivate::findByFileName(), and QLockFilePrivate::processNameByPid().

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

◆ filePath()

QString QFileSystemEntry::filePath ( ) const

Definition at line 98 of file qfilesystementry.cpp.

Referenced by QFileSystemEngine::getLinkTarget(), QFile::rename(), and QDirPrivate::resolveAbsoluteEntry().

+ Here is the caller graph for this function:

◆ isAbsolute()

bool QFileSystemEntry::isAbsolute ( ) const

Definition at line 241 of file qfilesystementry.cpp.

References QString::at(), and QString::isEmpty().

Referenced by isRelative(), and treatAsAbsolute().

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

◆ isClean()

bool QFileSystemEntry::isClean ( ) const

Definition at line 373 of file qfilesystementry.cpp.

References QString::constBegin(), QString::constEnd(), and iter.

Referenced by QDirPrivate::resolveAbsoluteEntry().

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

◆ isEmpty()

bool QFileSystemEntry::isEmpty ( ) const

Definition at line 310 of file qfilesystementry.cpp.

References QByteArray::isEmpty(), and QString::isEmpty().

Referenced by QFSFileEnginePrivate::doStat(), and QDirPrivate::resolveAbsoluteEntry().

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

◆ isRelative()

bool QFileSystemEntry::isRelative ( ) const

Definition at line 236 of file qfilesystementry.cpp.

References isAbsolute().

Referenced by QDir::isRelative(), QFileInfo::makeAbsolute(), and QDirPrivate::resolveAbsoluteEntry().

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

◆ isRoot()

bool QFileSystemEntry::isRoot ( ) const

Definition at line 304 of file qfilesystementry.cpp.

References isRootPath().

Referenced by QDir::isRoot().

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

◆ isRootPath()

bool QFileSystemEntry::isRootPath ( const QString & path)
static

Definition at line 291 of file qfilesystementry.cpp.

Referenced by QAbstractFileIconProviderPrivate::getFileType(), QFileIconProvider::icon(), isRoot(), and isRootPath().

+ Here is the caller graph for this function:

◆ nativeFilePath()

QFileSystemEntry::NativePath QFileSystemEntry::nativeFilePath ( ) const

Definition at line 104 of file qfilesystementry.cpp.

Referenced by QTemporaryFileName::QTemporaryFileName(), QFileSystemEngine::getLinkTarget(), QFileSystemEngine::getRawLinkPath(), readLink(), and readSymLink().

+ Here is the caller graph for this function:

◆ path()

QString QFileSystemEntry::path ( ) const

Definition at line 145 of file qfilesystementry.cpp.

References QString::at(), QString::left(), and QString::length().

+ Here is the call graph for this function:

◆ suffix()

QString QFileSystemEntry::suffix ( ) const

Definition at line 196 of file qfilesystementry.cpp.

References QString::mid(), and qMax().

+ Here is the call graph for this function:

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