Solid::Ifaces::Block Class

class Solid::Ifaces::Block
Header: #include <Block>
CMake: find_package(KF6 REQUIRED COMPONENTS Solid)
target_link_libraries(mytarget PRIVATE KF6::Solid)
Inherits: Solid::Ifaces::DeviceInterface
Inherited By:

Solid::Ifaces::StorageDrive and Solid::Ifaces::StorageVolume

Public Functions

virtual ~Block() override
virtual QString device() const = 0
virtual int deviceMajor() const = 0
virtual int deviceMinor() const = 0

Detailed Description

This device interface is available on block devices.

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.

Member Function Documentation

[override virtual noexcept] Block::~Block()

Destroys a Block object.

[pure virtual] QString Block::device() const

Retrieves the absolute path of the special file to interact with the device.

@return the absolute path of the special file to interact with the device

[pure virtual] int Block::deviceMajor() const

Retrieves the major number of the node file to interact with the device.

@return the device major number

[pure virtual] int Block::deviceMinor() const

Retrieves the minor number of the node file to interact with the device.

@return the device minor number