Solid::Block Class
This device interface is available on block devices. More...
- Header:
#include <Solid/Block> - CMake:
find_package(KF6 REQUIRED COMPONENTS Solid)
target_link_libraries(mytarget PRIVATE KF6::Solid) - Inherits: Solid::DeviceInterface
List of all members, including inherited members
Properties
- [read-only] device : QString
- [read-only] isSystem : bool
- [read-only] major : int
- [read-only] minor : int
Public Functions
- QString device() const
- int deviceMajor() const
- int deviceMinor() const
- bool isSystem() const (since 6.15)
Static Public Members
Detailed Description
A block device is an addressable device such as drive or partition. It is possible to interact with such a device using a special file in the system.
Property Documentation
[read-only] device : QString
Access functions:
QStringdevice() const
[read-only] isSystem : bool
Access functions:
boolisSystem() const
[read-only] major : int
Access functions:
intdeviceMajor() const
[read-only] minor : int
Access functions:
intdeviceMinor() const
Member Function Documentation
QString Block::device() const
Returns the absolute path of the special file to interact with the device.
Note: Getter function for property device.
[static] Solid::DeviceInterface::Type Block::deviceInterfaceType()
Returns the Solid::DeviceInterface::Type of the Block device interface.
See also Solid::DeviceInterface::Type
int Block::deviceMajor() const
Returns the major number of the node file to interact with the device.
Note: Getter function for property major.
int Block::deviceMinor() const
Returns the minor number of the node file to interact with the device.
Note: Getter function for property minor.
[since 6.15] bool Block::isSystem() const
Returns whether this block is considered a system block, that is, it requires additional permissions to access (mount/umount).
It defaults to false if the backend does not support it.
Note: Getter function for property isSystem.
This function was introduced in Qt 6.15.