KDE 4.6 PyKDE API Reference

- KDE's Python API

# KAutoMount Class Reference

`from PyKDE4.kio import *`

Inherits: QObject

## Detailed Description

This class implements synchronous mounting of devices, as well as showing a file-manager window after mounting a device, optionally. It is a wrapper around the asychronous KIO.special() call for mount, used by KMimeType.

This class implements synchronous mounting of devices.

## Signals

| error ()
| finished ()

## Methods

| __init__ (self, bool readonly, QByteArray format, QString device, QString mountpoint, QString desktopFile, bool show_filemanager_window=1)

## Signal Documentation

error | ( |  | ) |

Emitted in case the directory could not been mounted

Signal syntax:
  `QObject.connect(source, SIGNAL("error()"), target_slot)`

finished | ( |  | ) |

Emitted when the directory has been mounted

Signal syntax:
  `QObject.connect(source, SIGNAL("finished()"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | bool | readonly,
|  | QByteArray | format,
|  | QString | device,
|  | QString | mountpoint,
|  | QString | desktopFile,
|  | bool | show_filemanager_window=1
| ) |  |  |

Mounts a device.

Parameters:

  | readonly | if true, the device is mounted read-only
  | format | the file system (e.g. vfat, ext2...) [optional, fstab is used otherwise]
  | device | the path to the device (e.g. /dev/fd0)
  | mountpoint | the directory where to mount the device [optional, fstab is used otherwise]
  | desktopFile | the file the user clicked on - to notify KDirWatch of the fact that it should emit fileDirty for it (to have the icon change)
  | show_filemanager_window | if true, a file-manager window for that mountpoint is shown after the mount, if successful.