Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QFSFileEngine Class Reference
[QtCore module]

The QFSFileEngine class implements Qt's default file engine. More...

#include <QFSFileEngine>

Inherits QAbstractFileEngine.

This class was introduced in Qt 4.1.

Public Functions

Static Public Members

Additional Inherited Members


Detailed Description

The QFSFileEngine class implements Qt's default file engine.

This class is part of the file engine framework in Qt. If you only want to access files or directories, use QFile, QFileInfo or QDir instead.

QFSFileEngine is the default file engine for accessing regular files. It is provided for convenience; by subclassing this class, you can alter its behavior slightly, without having to write a complete QAbstractFileEngine subclass. To install your custom file engine, you must also subclass QAbstractFileEngineHandler and create an instance of your handler.

It can also be useful to create a QFSFileEngine object directly if you need to use the local file system inside QAbstractFileEngine::create(), in order to avoid recursion (as higher-level classes tend to call QAbstractFileEngine::create()).


Member Function Documentation

QFSFileEngine::QFSFileEngine ()

Constructs a QFSFileEngine.

QFSFileEngine::QFSFileEngine ( const QString & file )

Constructs a QFSFileEngine for the file name file.

QFSFileEngine::~QFSFileEngine ()

Destructs the QFSFileEngine.

QString QFSFileEngine::currentPath ( const QString & fileName = QString() )   [static]

Returns the current path of the file engine.

See also setCurrentPath().

QFileInfoList QFSFileEngine::drives ()   [static]

Returns the list of drives in the file system as a list of QFileInfo objects. On unix and Mac OS X, only the root path is returned. On Windows, this function returns all drives (A:, C:, D:, etc.).

FileFlags QFSFileEngine::fileFlags ( FileFlags type ) const   [virtual]

QString QFSFileEngine::fileName ( QAbstractFileEngine::FileName file ) const

QString QFSFileEngine::homePath ()   [static]

Returns the home path of the current user.

See also rootPath().

bool QFSFileEngine::open ( QIODevice::OpenMode flags, FILE * fh )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Opens the file handle fh using the open mode flags.

bool QFSFileEngine::open ( QIODevice::OpenMode flags, int fd )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Opens the file descriptor fd to the file engine, using the open mode flags.

uint QFSFileEngine::ownerId ( QAbstractFileEngine::FileOwner ) const

QString QFSFileEngine::rootPath ()   [static]

Returns the root path.

See also homePath().

bool QFSFileEngine::setCurrentPath ( const QString & path )   [static]

Sets the current path (e.g., for QDir), to path.

See also currentPath().

QString QFSFileEngine::tempPath ()   [static]

Returns the temporary path (i.e., a path in which it is safe to store temporary files).


Copyright © 2005 Trolltech Trademarks
Qt 4.1.0
Hosted by uCoz