Pages
API Documentation
On this page

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

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 nullptr for 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

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.