KDE 4.9 PyKDE API Reference

- KDE's Python API

# Block Class Reference

`from PyKDE4.solid import *`

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

## Detailed Description

This device interface is available on block devices.

A block device is an adressable device such as drive or partition. It is possible to interact with such a device using a special file in the system.

## Methods

| __init__ (self, QObject backendObject)
QString | device (self)
int | deviceMajor (self)
int | deviceMinor (self)

## Static Methods

Solid.DeviceInterface.Type | deviceInterfaceType ()

## Method Documentation

__init__ | ( | self, |
|  | QObject | backendObject
| ) |  |  |

Creates a new Block object. You generally won't need this. It's created when necessary using Device.as().

Parameters:

  | backendObject | the device interface object provided by the backend

See also:
  Solid.Device.as()

QString device | ( |  | self ) |

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

int deviceMajor | ( |  | self ) |

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

Returns:
  the device major number

int deviceMinor | ( |  | self ) |

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

Returns:
  the device minor number

## Static Method Documentation

Solid.DeviceInterface.Type deviceInterfaceType | ( |  | ) |

Get the Solid.DeviceInterface.Type of the Block device interface.

Returns:
  the Block device interface type

See also:
  Solid.Ifaces.Enums.DeviceInterface.Type