Solid::Block Class

class Solid::Block

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

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 : QString

Access functions:

QString device() const

[read-only] isSystem : bool

Access functions:

bool isSystem() const

[read-only] major : int

Access functions:

int deviceMajor() const

[read-only] minor : int

Access functions:

int deviceMinor() 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 6.15.