|
Qt Components Hildon
0.20
QML components for Maemo5 with Hildon styling.
|
Provides an interface for reading from and writing to files. More...
Public Slots | |
| void | close () |
| Closes the file. | |
| bool | open (int mode) |
| Opens the file using mode. | |
| string | read (int maxSize) |
| Reads maxSize bytes from the file and returns the data. | |
| string | readAll () |
| Reads all bytes from the file and returns the data. | |
| string | readLine (int maxSize=0) |
| Reads maxSize bytes from the current line of the file and returns the data. | |
| bool | remove () |
| Removes the file from the file system. | |
| bool | rename (string newName) |
| Renames the file to newName. | |
| int | write (string byteArray) |
| Writes byteArray to the file and returns the number of bytes written. | |
Signals | |
| void | error () |
| Emitted when an error occurs. | |
Properties | |
| string | errorString |
| A description of the last error that occurred. | |
| bool | exists |
| Whether the file specified by fileName exists. | |
| string | fileName |
| The file name. | |
| bool | isOpen |
| Whether the file is open. | |
| enumeration | openMode |
| The mode used to open the file. | |
| flags | permissions |
| The complete OR-ed together combination of File.Permission for the file. | |
| int | pos |
| The current position in bytes. | |
| int | size |
| The size of the file in bytes. | |
Provides an interface for reading from and writing to files.
File provides a subset of the C++ QFile API.
|
signal |
Emitted when an error occurs.
|
slot |
Reads maxSize bytes from the file and returns the data.
|
slot |
Reads all bytes from the file and returns the data.
|
slot |
|
slot |
Removes the file from the file system.
Returns true if successful.
|
slot |
|
read |
|
read |
The mode used to open the file.
Possible values are:
| Name | Description |
|---|---|
| File.NotOpen | The file is not open (default). |
| File.ReadOnly | The file is open for reading. |
| File.WriteOnly | The file is open for writing |
| File.ReadWrite | The file is open for reading and writing. |
| File.Append | The file is opened in append mode, so that all data is written to the end of the file. |
| File.Truncate | If possible, the file is truncated before it is opened. |
| File.Text | The end-of-line terminators are translated to '\n'. |
| File.Unbuffered | Any buffer is bypassed. |
|
readwrite |
The complete OR-ed together combination of File.Permission for the file.
Possible values are:
| Name | Description |
|---|---|
| File.ReadOwner | The file is readable by the owner of the file. |
| File.WriteOwner | The file is writable by the owner of the file. |
| File.ExeOwner | The file is executable by the owner of the file. |
| File.ReadUser | The file is readable by the user. |
| File.WriteUser | The file is writable by the user. |
| File.ExeUser | The file is executable by the user. |
| File.ReadGroup | The file is readable by the group. |
| File.WriteGroup | The file is writable by the group. |
| File.ExeGroup | The file is executable by the group. |
| File.ReadOther | The file is readable by anyone. |
| File.WriteOther | The file is writable by anyone. |
| File.ExeOther | The file is executable by anyone. |
1.8.1.2