KDE 4.4 PyKDE API Reference

- KDE's Python API

# KMountPoint Class Reference

`from PyKDE4.kio import *`

## Detailed Description

The KMountPoint class provides information about mounted and unmounted disks. It provides a system independent interface to fstab.

Author:
  Waldo Bastian <bastian@kde.org>

## Enumerations
DetailsNeededFlag | { BasicInfoNeeded, NeedMountOptions, NeedRealDeviceName }
FileSystemFlag | { SupportsChmod, SupportsChown, SupportsUTime, SupportsSymlinks, CaseInsensitive }
## Methods
| __init__ (self)
| __init__ (self, KMountPoint other)
KMountPoint.List | currentMountPoints (self, KMountPoint.DetailsNeededFlags infoNeeded=KMountPoint.BasicInfoNeeded)
QStringList | mountOptions (self)
QString | mountPoint (self)
QString | mountType (self)
QString | mountedFrom (self)
KMountPoint.List | possibleMountPoints (self, KMountPoint.DetailsNeededFlags infoNeeded=KMountPoint.BasicInfoNeeded)
bool | probablySlow (self)
QString | realDeviceName (self)
bool | testFileSystemFlag (self, KMountPoint.FileSystemFlag flag)

## Method Documentation

__init__ | ( |  | self ) |

Constructor

__init__ | ( | self, |
|  | KMountPoint | other
| ) |  |  |

KMountPoint.List currentMountPoints | ( | self, |
|  | KMountPoint.DetailsNeededFlags | infoNeeded=KMountPoint.BasicInfoNeeded
| ) |  |  |

This function gives a list of all currently used mountpoints. (mtab)

Parameters:

  | infoNeeded | Flags that specify which additional information should be fetched.

QStringList mountOptions | ( |  | self ) |

Options used to mount the filesystem. Only available when the NeedMountOptions flag was set.

QString mountPoint | ( |  | self ) |

Path where the filesystem is mounted or can be mounted.

QString mountType | ( |  | self ) |

Type of filesystem

QString mountedFrom | ( |  | self ) |

Where this filesystem gets mounted from. This can refer to a device, a remote server or something else.

KMountPoint.List possibleMountPoints | ( | self, |
|  | KMountPoint.DetailsNeededFlags | infoNeeded=KMountPoint.BasicInfoNeeded
| ) |  |  |

This function gives a list of all possible mountpoints. (fstab)

Parameters:

  | infoNeeded | Flags that specify which additional information should be fetched.

bool probablySlow | ( |  | self ) |

Checks if the filesystem that is probably slow (nfs mounts).

Returns:
  true if the filesystem is probably slow

QString realDeviceName | ( |  | self ) |

Canonical name of the device where the filesystem got mounted from. (Or empty, if not a device) Only available when the NeedRealDeviceName flag was set.

bool testFileSystemFlag | ( | self, |
|  | KMountPoint.FileSystemFlag | flag
| ) |  |  |

Checks the capabilities of the filesystem.

Parameters:

  | flag | the flag to check

Returns:
  true if the filesystem has that flag, false if not

The availables flags are:

- SupportsChmod: returns true if the filesystem supports chmod
(e.g. msdos filesystems return false)
- SupportsChown: returns true if the filesystem supports chown
(e.g. msdos filesystems return false)
- SupportsUtime: returns true if the filesystems supports utime
(e.g. msdos filesystems return false)
- SupportsSymlinks: returns true if the filesystems supports symlinks
(e.g. msdos filesystems return false)
- CaseInsensitive: returns true if the filesystem treats
"foo" and "FOO" as being the same file (true for msdos systems)

## Enumeration Documentation

DetailsNeededFlag

Flags that specify which additional details should be fetched for each mountpoint. BasicInfoNeeded: only the basic details: mountedFrom, mountPoint, mountType. NeedMountOptions: also fetch the options used when mounting, see mountOptions. NeedRealDeviceName: also fetch the device name (with symlinks resolved), see realDeviceName.

Enumerator:

  BasicInfoNeeded = 0 |
  NeedMountOptions = 1 |
  NeedRealDeviceName = 2 |

FileSystemFlag

Enumerator:

  SupportsChmod |
  SupportsChown |
  SupportsUTime |
  SupportsSymlinks |
  CaseInsensitive |