# QFile Class Reference

### [com.trolltech.qt.core package]

Inherits QIODevice.

### Constructor

- void QFile()
- void QFile(QObject parent)
- void QFile(String name)
- void QFile(String name, QObject parent)

### Constructor Properties

- prototype: The QFile prototype object
- bool copy(String fileName, String newName)
- String decodeName(QByteArray localFileName)
- QByteArray encodeName(String fileName)
- bool exists(String fileName)
- bool link(String oldname, String newName)
- Permissions permissions(String filename)
- bool remove(String fileName)
- bool rename(String oldName, String newName)
- bool resize(String filename, qint64 sz)
- bool setPermissions(String filename, Permissions permissionSpec)
- String symLinkTarget(String fileName)
- NoError = 0
- ReadError = 1
- WriteError = 2
- FatalError = 3
- ResourceError = 4
- OpenError = 5
- AbortError = 6
- TimeOutError = 7
- UnspecifiedError = 8
- RemoveError = 9
- RenameError = 10
- PositionError = 11
- ResizeError = 12
- PermissionsError = 13
- CopyError = 14
- FileError( value )
- NoOptions = 0
- MemoryMapFlags( value )
- ExeOther = 0x0001
- WriteOther = 0x0002
- ReadOther = 0x0004
- ExeGroup = 0x0010
- WriteGroup = 0x0020
- ReadGroup = 0x0040
- ExeUser = 0x0100
- WriteUser = 0x0200
- ReadUser = 0x0400
- ExeOwner = 0x1000
- WriteOwner = 0x2000
- ReadOwner = 0x4000
- Permission( value )
- Permissions( value1, value2, ... )

### Prototype Object Properties

The QFile prototype object inherits properties from the QIODevice prototype object and also has the following properties.

- bool copy(String newName)
- FileError error()
- bool exists()
- QAbstractFileEngine fileEngine()
- String fileName()
- bool flush()
- int handle()
- bool link(String newName)
- Permissions permissions()
- bool remove()
- bool rename(String newName)
- bool resize(qint64 sz)
- void setFileName(String name)
- bool setPermissions(Permissions permissionSpec)
- String symLinkTarget()
- void unsetError()

### Instance Properties

QFile objects have no special properties beyond those inherited from the QFile prototype object.