|  | Home · All Classes · Modules

# QFSFileEngine Class Reference
[QtCore module]

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

Inherits QAbstractFileEngine.

### Methods

- __init__ (self)
- __init__ (self, QString file)
- bool caseSensitive (self)
- bool close (self)
- bool copy (self, QString newName)
- QStringList entryList (self, QDir.Filters filters, QStringList filterNames)
- QAbstractFileEngine.FileFlags fileFlags (self, QAbstractFileEngine.FileFlags type)
- QString fileName (self, QAbstractFileEngine.FileName file)
- QDateTime fileTime (self, QAbstractFileEngine.FileTime time)
- bool flush (self)
- int handle (self)
- bool isRelativePath (self)
- bool isSequential (self)
- bool link (self, QString newName)
- bool mkdir (self, QString dirName, bool createParentDirectories)
- bool open (self, QIODevice.OpenMode openMode)
- bool open (self, QIODevice.OpenMode flags, int fd)
- QString owner (self, QAbstractFileEngine.FileOwner)
- unsigned long ownerId (self, QAbstractFileEngine.FileOwner)
- long pos (self)
- object read (self, long maxlen)
- object readLine (self, long maxlen)
- bool remove (self)
- bool rename (self, QString newName)
- bool rmdir (self, QString dirName, bool recurseParentDirectories)
- bool seek (self, long)
- setFileName (self, QString file)
- bool setPermissions (self, unsigned long perms)
- bool setSize (self, long size)
- long size (self)
- long write (self, str data)

### Static Methods

- QString currentPath (QString path = QString())
- QFileInfo-list drives ()
- QString homePath ()
- QString rootPath ()
- bool setCurrentPath (QString path)
- QString tempPath ()

## 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()).

## Method Documentation

### QFSFileEngine.__init__ (self)

Constructs a QFSFileEngine.

### QFSFileEngine.__init__ (self, QString file)

Constructs a QFSFileEngine for the file name file.

### bool QFSFileEngine.caseSensitive (self)

### bool QFSFileEngine.close (self)

### bool QFSFileEngine.copy (self, QString newName)

### QString QFSFileEngine.currentPath (QString path = QString())

See also setCurrentPath().

### QFileInfo-list QFSFileEngine.drives ()

### QStringList QFSFileEngine.entryList (self, QDir.Filters filters, QStringList filterNames)

### QAbstractFileEngine.FileFlags QFSFileEngine.fileFlags (self, QAbstractFileEngine.FileFlags type)

### QString QFSFileEngine.fileName (self, QAbstractFileEngine.FileName file)

### QDateTime QFSFileEngine.fileTime (self, QAbstractFileEngine.FileTime time)

### bool QFSFileEngine.flush (self)

### int QFSFileEngine.handle (self)

### QString QFSFileEngine.homePath ()

### bool QFSFileEngine.isRelativePath (self)

### bool QFSFileEngine.isSequential (self)

### bool QFSFileEngine.link (self, QString newName)

### bool QFSFileEngine.mkdir (self, QString dirName, bool createParentDirectories)

### bool QFSFileEngine.open (self, QIODevice.OpenMode openMode)

Opens the file handle fh in openMode mode. Returns true on success; otherwise returns false.

### bool QFSFileEngine.open (self, QIODevice.OpenMode flags, int fd)

### QString QFSFileEngine.owner (self, QAbstractFileEngine.FileOwner)

### unsigned long QFSFileEngine.ownerId (self, QAbstractFileEngine.FileOwner)

### long QFSFileEngine.pos (self)

### object QFSFileEngine.read (self, long maxlen)

### object QFSFileEngine.readLine (self, long maxlen)

### bool QFSFileEngine.remove (self)

### bool QFSFileEngine.rename (self, QString newName)

### bool QFSFileEngine.rmdir (self, QString dirName, bool recurseParentDirectories)

### QString QFSFileEngine.rootPath ()

### bool QFSFileEngine.seek (self, long)

### bool QFSFileEngine.setCurrentPath (QString path)

See also currentPath().

### QFSFileEngine.setFileName (self, QString file)

### bool QFSFileEngine.setPermissions (self, unsigned long perms)

### bool QFSFileEngine.setSize (self, long size)

### long QFSFileEngine.size (self)

### QString QFSFileEngine.tempPath ()

### long QFSFileEngine.write (self, str data)