KMountPoint::List Class
Network transparent access to files and data. More...
- Header:
#include <List> - CMake:
find_package(KF6 REQUIRED COMPONENTS KIO)
target_link_libraries(mytarget PRIVATE KF6::KIOCore) - Inherits: QList
List of all members, including inherited members
Public Functions
- KMountPoint::Ptr findByDevice(const QString &device) const
- KMountPoint::Ptr findByMountId(quint64 mountId) const (since 6.24)
- KMountPoint::Ptr findByPath(const QString &path) const
Detailed Description
List of mount points.
Member Function Documentation
KMountPoint::Ptr List::findByDevice(const QString &device) const
Returns the mount point associated with device, i.e. the one where mountedFrom() == device (after symlink resolution).
Returns the mountpoint, or nullptr if this device doesn't exist or isn't mounted
[since 6.24] KMountPoint::Ptr List::findByMountId(quint64 mountId) const
Returns the mount point associated with mountId
Returns the mountpoint, or nullptr if there is no mount point associated with this ID.
This is prefered over looking up a path because it does not have to deal with symlinks.
Note: This is only supported on Linux and returns
nullptrfor all other platforms
Warning: mountId must not be zero
This function was introduced in Qt 6.24.
KMountPoint::Ptr List::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
path the path to check
Returns the mount point of the given file