44 #include <QtCore/qdir.h> 45 #include <QtCore/qfile.h> 46 #include <QtCore/private/qfsfileengine_p.h> 48 #include <QtCore/qstringbuilder.h> 61 if (idx == -1 || idx + 1 == localPath.
length())
79 m_firstDotInFileName(0),
80 m_lastDotInFileName(0)
152 #if defined(QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16) 174 #elif defined(QFILESYSTEMENTRY_NATIVE_PATH_IS_UTF16) 185 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 196 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 204 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 220 #if defined(Q_OS_WIN) 236 #if defined(Q_OS_WIN) 262 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 293 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 307 #
if defined(
Q_OS_WIN) || defined(Q_OS_SYMBIAN)
345 int firstDotInFileName = -1;
346 int lastDotInFileName = -1;
350 if (lastSeparator < 0) {
354 stop = lastSeparator;
358 for (; i >= stop; --i) {
360 firstDotInFileName = lastDotInFileName = i;
368 if (lastSeparator != i) {
369 for (--i; i >= stop; --i) {
371 firstDotInFileName = i;
380 if (lastDotInFileName == -1)
382 else if (firstDotInFileName == lastDotInFileName)
397 if (dots == 1 || dots == 2)
417 return (dots != 1 && dots != 2);
The QDir class provides access to directory structures and their contents.
void resolveNativeFilePath() const
bool isLetter() const
Returns true if the character is a letter (Letter_* categories); otherwise returns false...
#define QT_END_NAMESPACE
This macro expands to.
const QChar at(int i) const
Returns the character at the given index position in the string.
void findLastSeparator() const
static QString fixIfRelativeUncPath(const QString &path)
int length() const
Returns the number of characters in this string.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
qint16 m_firstDotInFileName
The QString class provides a Unicode character string.
static QString currentPath()
Returns the absolute path of the application's current directory.
The QChar class provides a 16-bit Unicode character.
static bool isUncRoot(const QString &server)
static QString longFileName(const QString &path)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
NativePath nativeFilePath() const
static QString decodeName(const QByteArray &localFileName)
This does the reverse of QFile::encodeName() using localFileName.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first character in the string. ...
#define QT_BEGIN_NAMESPACE
This macro expands to.
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
int size() const
Returns the number of characters in this string.
const QChar * unicode() const
Returns a '\0'-terminated Unicode representation of the string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
NativePath m_nativeFilePath
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
QString right(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n rightmost characters of the string.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
static QAuServer & server()
QString trimmed(QString source)
qint16 m_lastDotInFileName
QString completeBaseName() const
void findFileNameSeparators() const
static QByteArray encodeName(const QString &fileName)
By default, this function converts fileName to the local 8-bit encoding determined by the user's loca...
static QString fromNativeSeparators(const QString &pathName)
Returns pathName using '/' as file separator.
void resolveFilePath() const
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the '/' separators converted to separators that are appropriate for the underly...
QString completeSuffix() const
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.