Qtopia library API Documentation

StorageInfo Class Reference

The StorageInfo class describes the disks mounted on the file system. More...

#include <storage.h>

Inheritance diagram for StorageInfo:

Inheritance graph
[legend]
Collaboration diagram for StorageInfo:

Collaboration graph
[legend]
List of all members.

Public Slots

void update ()

Signals

void disksChanged ()

Public Member Functions

 StorageInfo (QObject *parent=0)
const QList< FileSystem > & fileSystems () const
const FileSystemfileSystemOf (const QString &filename)

Static Public Member Functions

bool hasCf ()
 returns whether device has Cf mounted

bool hasSd ()
 returns whether device has SD mounted

bool hasMmc ()
 returns whether device has mmc mounted


Detailed Description

The StorageInfo class describes the disks mounted on the file system.

This class provides access to the mount information for the Linux filesystem. Each mount point is represented by the FileSystem class. To ensure this class has the most up to date size information, call the update() method. Note that this will automatically be signaled by the operating system when a disk has been mounted or unmounted.

Definition at line 29 of file storage.h.


Constructor & Destructor Documentation

StorageInfo::StorageInfo QObject parent = 0  ) 
 

Constructor that determines the current mount points of the filesystem. The standard parent parameters is passed on to QObject.

Definition at line 97 of file storage.cpp.

References QObject::connect(), and update().


Member Function Documentation

const QList< FileSystem > & StorageInfo::fileSystems  )  const [inline]
 

Returns a list of all available mounted file systems.

Warning:
This may change in Qtopia 3.x to return only relevant Qtopia file systems (and ignore mount points such as /tmp)

Definition at line 35 of file storage.h.

Referenced by Global::findDocuments().

const FileSystem * StorageInfo::fileSystemOf const QString filename  ) 
 

Returns the longest matching FileSystem that starts with the same prefix as filename as its mount point.

Definition at line 110 of file storage.cpp.

References QString::startsWith().

Referenced by AppLnk::linkFile().

bool StorageInfo::hasCf  )  [static]
 

returns whether device has Cf mounted

Definition at line 287 of file storage.cpp.

bool StorageInfo::hasSd  )  [static]
 

returns whether device has SD mounted

Definition at line 297 of file storage.cpp.

bool StorageInfo::hasMmc  )  [static]
 

returns whether device has mmc mounted

Definition at line 307 of file storage.cpp.

References hasMmc().

Referenced by hasMmc().

void StorageInfo::disksChanged  )  [signal]
 

Gets emitted when a disk has been mounted or unmounted, such as when a CF c

Referenced by update().

void StorageInfo::update  )  [slot]
 

Updates the mount and free space available information for each mount point. This method is automatically called when a disk is mounted or unmounted.

Definition at line 134 of file storage.cpp.

References QList< FileSystem >::append(), QValueList::append(), QValueList::begin(), QList< FileSystem >::clear(), QList< FileSystem >::count(), disksChanged(), QValueList::end(), QString::left(), and QObject::tr().

Referenced by StorageInfo().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:26 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001