Pages
API Documentation
On this page

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

Public Functions

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:

[read-only] isSystem : bool

Access functions:

[read-only] major : int

Access functions:

[read-only] minor : int

Access functions:

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.

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