Solid::Block Class
class Solid::BlockThis 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 |
Properties
Public Functions
| QString | device() const |
| int | deviceMajor() const |
| int | deviceMinor() const |
(since 6.15) bool | isSystem() const |
Static Public Members
| Solid::DeviceInterface::Type | deviceInterfaceType() |
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 : const QString
Access functions:
| QString | device() const |
[read-only] isSystem : const bool
Access functions:
| bool | isSystem() const |
[read-only] major : const int
Access functions:
| int | deviceMajor() const |
[read-only] minor : const int
Access functions:
| int | deviceMinor() const |
Member Function Documentation
QString Block::device() const
Retrieves the absolute path of the special file to interact with the device.
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()
Get the Solid::DeviceInterface::Type of the Block device interface.
Returns the Block device interface type
See also Solid::Ifaces::Enums::DeviceInterface::Type.
int Block::deviceMajor() const
Retrieves the major number of the node file to interact with the device.
Returns the device major number
Note: Getter function for property major.
int Block::deviceMinor() const
Retrieves the minor number of the node file to interact with the device.
Returns the device minor number
Note: Getter function for property minor.
[since 6.15] bool Block::isSystem() const
Whether this block is considered a system block, that 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 6.15.