Solid::Ifaces::StorageDrive Class

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

Solid::Ifaces::OpticalDrive

Public Functions

virtual ~StorageDrive() override
virtual Solid::StorageDrive::Bus bus() const = 0
virtual Solid::StorageDrive::DriveType driveType() const = 0
virtual bool isHotpluggable() const = 0
virtual bool isRemovable() const = 0
virtual qulonglong size() const = 0
virtual QDateTime timeDetected() const
virtual QDateTime timeMediaDetected() const

Detailed Description

This device interface is available on storage devices.

A storage is anything that can contain a set of volumes (card reader, hard disk, cdrom drive...). It's a particular kind of block device.

Member Function Documentation

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

Destroys a StorageDrive object.

[pure virtual] Solid::StorageDrive::Bus StorageDrive::bus() const

Retrieves the type of physical interface this storage device is connected to.

@return the bus type @see Solid::StorageDrive::Bus

[pure virtual] Solid::StorageDrive::DriveType StorageDrive::driveType() const

Retrieves the type of this storage drive.

@return the drive type @see Solid::StorageDrive::DriveType

[pure virtual] bool StorageDrive::isHotpluggable() const

Indicates if this storage device can be plugged or unplugged while the computer is running.

@return true if this storage supports hotplug, false otherwise

[pure virtual] bool StorageDrive::isRemovable() const

Indicates if the media contained by this drive can be removed.

For example memory card can be removed from the drive by the user, while partitions can't be removed from hard disks.

@return true if media can be removed, false otherwise.

[pure virtual] qulonglong StorageDrive::size() const

Retrieves this drives size in bytes.

@return the size of this drive

[virtual] QDateTime StorageDrive::timeDetected() const

Retrieves the time the drive was detected

[virtual] QDateTime StorageDrive::timeMediaDetected() const

Retrieves the time media in the drive was detected