KDECore
kmountpoint.cpp
Go to the documentation of this file.
180 const QString potentialDevice = QFile::symLinkTarget(QString::fromLatin1("/dev/disk/by-uuid/") + uuid);
187 const QString potentialDevice = QFile::symLinkTarget(QString::fromLatin1("/dev/disk/by-label/") + label);
495 return parent.compare(child, cs) == 0 || parent.endsWith(slash) || child.at(parent.length()) == slash;
498 return parent.endsWith(slash) && (parent.length() == child.length() + 1) && parent.startsWith(child, cs);
528 if (realDevice.isEmpty()) // d->device can be empty in the loop below, don't match empty with it
542 bool autofs = d->mountType == QLatin1String("autofs") || d->mountType == QLatin1String("subfs");
556 const bool isMsDos = ( d->mountType == QLatin1String("msdos") || d->mountType == QLatin1String("fat") || d->mountType == QLatin1String("vfat") );
557 const bool isNtfs = d->mountType.contains(QLatin1String("fuse.ntfs")) || d->mountType.contains(QLatin1String("fuseblk.ntfs"))
560 const bool isSmb = d->mountType == QLatin1String("cifs") || d->mountType == QLatin1String("smbfs");
567 return !isMsDos && !isNtfs && !isSmb; // it's amazing the number of things Microsoft filesystems don't support :)
bool probablySlow() const
Checks if the filesystem that is probably slow (network mounts).
Definition: kmountpoint.cpp:538
The KMountPoint class provides information about mounted and unmounted disks.
Definition: kmountpoint.h:35
static QString realFilePath(const QString &filename)
Expands all symbolic links and resolves references to '/.
Definition: kstandarddirs.cpp:973
QString fromNativeSeparators(const QString &pathName)
QString readLine(qint64 maxlen)
static List currentMountPoints(DetailsNeededFlags infoNeeded=BasicInfoNeeded)
This function gives a list of all currently used mountpoints.
Definition: kmountpoint.cpp:295
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
QString mountedFrom() const
Where this filesystem gets mounted from.
Definition: kmountpoint.cpp:454
QString realDeviceName() const
Canonical name of the device where the filesystem got mounted from.
Definition: kmountpoint.cpp:459
Ptr findByDevice(const QString &device) const
Returns the mount point associated with device, i.e.
Definition: kmountpoint.cpp:525
QString simplified() const
bool exists() const
Definition: kmountpoint.h:70
int count(const T &value) const
void append(const T &value)
Definition: kmountpoint.h:122
bool atEnd() const
QString symLinkTarget() const
bool isEmpty() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
Definition: kmountpoint.h:122
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
Definition: kaboutdata.h:33
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
bool testFileSystemFlag(FileSystemFlag flag) const
Checks the capabilities of the filesystem.
Definition: kmountpoint.cpp:554
iterator end()
virtual void close()
Definition: kmountpoint.h:123
static QString devNameFromOptions(const QStringList &options)
When using supermount, the device name is in the options field as dev=/my/device. ...
Definition: kmountpoint.cpp:161
QString mountPoint() const
Path where the filesystem is mounted or can be mounted.
Definition: kmountpoint.cpp:464
QString mid(int position, int n) const
QStringList mountOptions() const
Options used to mount the filesystem.
Definition: kmountpoint.cpp:474
static List possibleMountPoints(DetailsNeededFlags infoNeeded=BasicInfoNeeded)
This function gives a list of all possible mountpoints.
Definition: kmountpoint.cpp:208
Ptr findByPath(const QString &path) const
Find the mountpoint on which resides path For instance if /home is a separate partition, findByPath("/home/user/blah") will return /home.
Definition: kmountpoint.cpp:502
const QChar at(int position) const
typedef ConstIterator
int length() const
Definition: kmountpoint.h:123
QString fromLatin1(const char *str, int size)
static bool pathsAreParentAndChildOrEqual(const QString &parent, const QString &child)
Definition: kmountpoint.cpp:484
int compare(const QString &other) const
iterator begin()
Definition: kmountpoint.h:122
QString decodeName(const QByteArray &localFileName)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.