![]() |
Qt 6.x
The Qt SDK
|
#include <qfilesystementry_p.h>
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) |
Definition at line 24 of file qfilesystementry_p.h.
Definition at line 29 of file qfilesystementry_p.h.
QFileSystemEntry::QFileSystemEntry | ( | ) |
Definition at line 40 of file qfilesystementry.cpp.
Referenced by clear().
|
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 52 of file qfilesystementry.cpp.
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 65 of file qfilesystementry.cpp.
QFileSystemEntry::QFileSystemEntry | ( | const NativePath & | nativeFilePath, |
FromNativePath | dummy | ||
) |
Use this constructor when the path comes from a native API
Definition at line 77 of file qfilesystementry.cpp.
QFileSystemEntry::QFileSystemEntry | ( | const QString & | filePath, |
const NativePath & | nativeFilePath | ||
) |
Definition at line 85 of file qfilesystementry.cpp.
QString QFileSystemEntry::baseName | ( | ) | const |
Definition at line 160 of file qfilesystementry.cpp.
References QString::at(), QString::length(), and QString::mid().
Referenced by QFileInfo::baseName().
|
inline |
Definition at line 64 of file qfilesystementry_p.h.
References QFileSystemEntry().
QString QFileSystemEntry::completeBaseName | ( | ) | const |
Definition at line 176 of file qfilesystementry.cpp.
References QString::at(), QString::length(), and QString::mid().
Referenced by QFileInfo::completeBaseName().
QString QFileSystemEntry::completeSuffix | ( | ) | const |
Definition at line 202 of file qfilesystementry.cpp.
References QString::mid(), and qMax().
QString QFileSystemEntry::fileName | ( | ) | const |
Definition at line 131 of file qfilesystementry.cpp.
References QString::at(), QString::length(), and QString::mid().
Referenced by QDirIteratorPrivate::advance(), QMimeDatabasePrivate::findByFileName(), and QLockFilePrivate::processNameByPid().
QString QFileSystemEntry::filePath | ( | ) | const |
Definition at line 94 of file qfilesystementry.cpp.
Referenced by QFileSystemEngine::absoluteName(), QDir::canonicalPath(), QTemporaryDirPrivate::create(), QDir::currentPath(), QFSFileEngine::currentPath(), QFileInfoPrivate::getFileName(), QFileSystemEngine::getLinkTarget(), QFile::moveToTrash(), QFileInfo::operator==(), QDirIterator::path(), QFile::rename(), QDirPrivate::resolveAbsoluteEntry(), and tryDriveUNCFallback().
bool QFileSystemEntry::isAbsolute | ( | ) | const |
Definition at line 237 of file qfilesystementry.cpp.
References QString::at(), QString::isEmpty(), and QChar::unicode().
Referenced by isRelative(), and treatAsAbsolute().
bool QFileSystemEntry::isClean | ( | ) | const |
Definition at line 369 of file qfilesystementry.cpp.
References QString::constBegin(), QString::constEnd(), and iter.
Referenced by QDirPrivate::resolveAbsoluteEntry().
bool QFileSystemEntry::isEmpty | ( | ) | const |
Definition at line 306 of file qfilesystementry.cpp.
References QString::isEmpty(), and QByteArray::isEmpty().
Referenced by QFSFileEnginePrivate::doStat(), and QDirPrivate::resolveAbsoluteEntry().
bool QFileSystemEntry::isRelative | ( | ) | const |
Definition at line 232 of file qfilesystementry.cpp.
References isAbsolute().
Referenced by QDir::isRelative(), QFileInfo::makeAbsolute(), and QDirPrivate::resolveAbsoluteEntry().
bool QFileSystemEntry::isRoot | ( | ) | const |
Definition at line 300 of file qfilesystementry.cpp.
References isRootPath().
Referenced by QDir::isRoot().
|
static |
Definition at line 287 of file qfilesystementry.cpp.
Referenced by QFileIconProvider::icon(), isRoot(), isRootPath(), and QAbstractFileIconProvider::type().
QFileSystemEntry::NativePath QFileSystemEntry::nativeFilePath | ( | ) | const |
Definition at line 100 of file qfilesystementry.cpp.
Referenced by QTemporaryFileName::QTemporaryFileName(), QFileSystemEngine::absoluteName(), QFileSystemEngine::getLinkTarget(), QFileSystemEngine::getRawLinkPath(), readLink(), readSymLink(), tryDriveUNCFallback(), and tryFindFallback().
QString QFileSystemEntry::path | ( | ) | const |
Definition at line 141 of file qfilesystementry.cpp.
References QString::at(), QString::left(), and QString::length().
QString QFileSystemEntry::suffix | ( | ) | const |
Definition at line 192 of file qfilesystementry.cpp.
References QString::mid(), and qMax().