• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

KMountPoint Class Reference

The KMountPoint class provides information about mounted and unmounted disks. More...

#include <kmountpoint.h>

Inheritance diagram for KMountPoint:
KShared

List of all members.

Classes

class  List
 List of mount points. More...

Public Types

enum  DetailsNeededFlag { BasicInfoNeeded = 0, NeedMountOptions = 1, NeedRealDeviceName = 2 }
enum  FileSystemFlag {
  SupportsChmod, SupportsChown, SupportsUTime, SupportsSymlinks,
  CaseInsensitive
}
typedef KSharedPtr< KMountPoint > Ptr

Public Member Functions

QString mountedFrom () const
QStringList mountOptions () const
QString mountPoint () const
QString mountType () const
bool probablySlow () const
QString realDeviceName () const
bool testFileSystemFlag (FileSystemFlag flag) const
 ~KMountPoint ()

Static Public Member Functions

static List currentMountPoints (DetailsNeededFlags infoNeeded=BasicInfoNeeded)
static List possibleMountPoints (DetailsNeededFlags infoNeeded=BasicInfoNeeded)

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>

Definition at line 35 of file kmountpoint.h.


Member Typedef Documentation

typedef KSharedPtr<KMountPoint> KMountPoint::Ptr

Definition at line 38 of file kmountpoint.h.


Member Enumeration Documentation

enum KMountPoint::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 
NeedMountOptions 
NeedRealDeviceName 

Definition at line 70 of file kmountpoint.h.

enum KMountPoint::FileSystemFlag
Enumerator:
SupportsChmod 
SupportsChown 
SupportsUTime 
SupportsSymlinks 
CaseInsensitive 

Definition at line 122 of file kmountpoint.h.


Constructor & Destructor Documentation

KMountPoint::~KMountPoint (  ) 

Destructor.

Definition at line 120 of file kmountpoint.cpp.


Member Function Documentation

KMountPoint::List KMountPoint::currentMountPoints ( DetailsNeededFlags  infoNeeded = BasicInfoNeeded  )  [static]

This function gives a list of all currently used mountpoints.

(mtab)

Parameters:
infoNeeded Flags that specify which additional information should be fetched.

Definition at line 282 of file kmountpoint.cpp.

QString KMountPoint::mountedFrom (  )  const

Where this filesystem gets mounted from.

This can refer to a device, a remote server or something else.

Definition at line 436 of file kmountpoint.cpp.

QStringList KMountPoint::mountOptions (  )  const

Options used to mount the filesystem.

Only available when the NeedMountOptions flag was set.

Definition at line 456 of file kmountpoint.cpp.

QString KMountPoint::mountPoint (  )  const

Path where the filesystem is mounted or can be mounted.

Definition at line 446 of file kmountpoint.cpp.

QString KMountPoint::mountType (  )  const

Type of filesystem.

Definition at line 451 of file kmountpoint.cpp.

KMountPoint::List KMountPoint::possibleMountPoints ( DetailsNeededFlags  infoNeeded = BasicInfoNeeded  )  [static]

This function gives a list of all possible mountpoints.

(fstab)

Parameters:
infoNeeded Flags that specify which additional information should be fetched.

Definition at line 199 of file kmountpoint.cpp.

bool KMountPoint::probablySlow (  )  const

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

Returns:
true if the filesystem is probably slow

Definition at line 502 of file kmountpoint.cpp.

QString KMountPoint::realDeviceName (  )  const

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.

Definition at line 441 of file kmountpoint.cpp.

bool KMountPoint::testFileSystemFlag ( FileSystemFlag  flag  )  const

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)

Definition at line 517 of file kmountpoint.cpp.


The documentation for this class was generated from the following files:
  • kmountpoint.h
  • kmountpoint.cpp

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal