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.
Enumerations | |
DetailsNeededFlag | { BasicInfoNeeded, NeedMountOptions, NeedRealDeviceName } Typesafe wrapper: DetailsNeededFlags |
FileSystemFlag | { SupportsChmod, SupportsChown, SupportsUTime, SupportsSymlinks, CaseInsensitive } |
Methods | |
__init__ (self) | |
__init__ (self, KMountPoint other) | |
QStringList | mountOptions (self) |
QString | mountPoint (self) |
QString | mountType (self) |
QString | mountedFrom (self) |
bool | probablySlow (self) |
QString | realDeviceName (self) |
bool | testFileSystemFlag (self, KMountPoint.FileSystemFlag flag) |
Static Methods | |
KMountPoint.List | currentMountPoints (KMountPoint.DetailsNeededFlags infoNeeded=KMountPoint.BasicInfoNeeded) |
KMountPoint.List | possibleMountPoints (KMountPoint.DetailsNeededFlags infoNeeded=KMountPoint.BasicInfoNeeded) |
Method Documentation
__init__ | ( | self ) |
Constructor
__init__ | ( | self, | ||
KMountPoint | other | |||
) |
KMountPoint.List currentMountPoints | ( | 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 | ( | 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:
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.
- Note:
- It is necessary to wrap members of this enumeration in a
DetailsNeededFlags
instance when passing them to a method as group of flags. For example:DetailsNeededFlags( BasicInfoNeeded | NeedMountOptions)
- Enumerator:
-
BasicInfoNeeded = 0 NeedMountOptions = 1 NeedRealDeviceName = 2
FileSystemFlag |
- Enumerator:
-
SupportsChmod SupportsChown SupportsUTime SupportsSymlinks CaseInsensitive