Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QFileSystem Class Reference
[QtBaseModule]

The QFileSystem class describes a single mount point. More...

    #include <QFileSystem>

Public Functions

Static Public Members


Detailed Description

The QFileSystem class describes a single mount point.

This class is an informational result structure returned by the QStorageMetaInfo class. This class should not be created directly, but should rather be used in tandem with the QStorageMetaInfo class.


Member Function Documentation

QFileSystem::QFileSystem ()

Construct an empty QFileSystem object.

QFileSystem::QFileSystem ( const QFileSystem & other )

Construct a copy of other.

QFileSystem::~QFileSystem ()

Destroys this QFileSystem object.

bool QFileSystem::applications () const

Returns flag indicating if the file system can contain applications.

QFileSystem QFileSystem::applicationsFileSystem ()   [static]

Returns the QFileSystem which contains the default application storage path.

The default application storage path can be obtained by calling QFileSystem::applicationsFileSystem().applicationsPath().

See also applicationsPath().

const QString & QFileSystem::applicationsPath () const

Returns the path of the applications directory, eg. /home/Applications.

long QFileSystem::availBlocks () const

Returns the number of available blocks on the file system

long QFileSystem::blockSize () const

Returns the size of each block on the file system.

void QFileSystem::connect () const

Connects the filesystem to the content system by sending the QCop message QPE/QStorage::mounting(QString).

Note: This call is asynchronous. QStorageMetaInfo will emit the disksChanged() signal once the filesystem has been connected.

See also isConnected() and QStorageMetaInfo::disksChanged().

bool QFileSystem::contentDatabase () const

Returns flag indicating if the file system has it's own content database stored.

void QFileSystem::disconnect () const

Disconnects the filesystem from the content system by sending the QCop message QPE/QStorage::unmounting(QString).

Note: This call is asynchronous. QStorageMetaInfo will emit the disksChanged() signal once the filesystem has been disconnected.

See also isConnected() and QStorageMetaInfo::disksChanged().

const QString & QFileSystem::disk () const

Returns the file system name, eg. /dev/hda3

bool QFileSystem::documents () const

Returns flag indicating if the file system can contain documents.

QFileSystem QFileSystem::documentsFileSystem ()   [static]

Returns the QFileSystem which contains the default document storage path.

The default document storage path can be obtained by calling QFileSystem::documentsFileSystem().documentsPath().

See also documentsPath().

const QString & QFileSystem::documentsPath () const

Returns the path of the documents directory, eg. /home/Documents.

QFileSystem QFileSystem::fromFileName ( const QString & fileName, bool connectedOnly = true )   [static]

Returns a QFileSystem object describing the file system on which the file with the name fileName is located.

If connectedOnly is true the QFileSystem will only be returned if it is currently connected.

bool QFileSystem::isConnected () const

Returns flag indicating if the file system is currently connected.

See also connect() and disconnect().

bool QFileSystem::isMounted () const

Returns true if the filesystem is mounted.

See also mount() and unmount().

bool QFileSystem::isNull () const

Returns true if the QFileSystem is unitialised.

bool QFileSystem::isRemovable () const

Returns flag indicating if the file system can be removed. For example, a CF card would be removable, but the internal memory would not.

bool QFileSystem::isWritable () const

Returns flag indicating if the file system is mounted as writable or read-only. Returns false if read-only, true if read and write.

bool QFileSystem::mount () const

Mounts the filesystem. Returns true on success, false otherwise. Returns false if the filesystem is already mounted.

The filesystem must have a corresponding entry in the /etc/fstab file. The mount point directory must exist.

After the filesystem is sucessfully mounted it should be connected to the content system by calling connect().

See also unmount() and connect().

const QString & QFileSystem::name () const

Returns the translated, human readable name for the mount directory.

const QString & QFileSystem::options () const

Returns the mount options

const QString & QFileSystem::path () const

Returns the mount path, eg. /home

const QString & QFileSystem::prevPath () const

Returns the previous mount path, eg. /home This is useful when a filesystem has been unmounted.

bool QFileSystem::storesType ( const QString & type ) const

Returns true if the file system can store files of type.

The path of these files is given by typePath().

long QFileSystem::totalBlocks () const

Returns the total number of blocks on the file system

QFileSystem QFileSystem::typeFileSystem ( const QString & type )   [static]

Returns the QFileSystem that is the default storage location for files of type.

QString QFileSystem::typePath ( const QString & type ) const

Returns the path for files of type stored on a filesystem.

If no path is defined this returns the root path of the filesystem.

The return value of this is only valid if storesType() returns true.

bool QFileSystem::unmount () const

Unmounts the filesystem from the system. Returns true on success, false otherwise. Returns false if the filesystem is already unmounted.

The filesystem must have previously been disconnected from the content system with disconnect().

See also mount() and disconnect().

QFileSystem & QFileSystem::operator= ( const QFileSystem & other )

Assign the contents of other to this object.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3