Resource¶
Description¶
The Resource object provides the content of a local or remote file as a string. This can be used to easily process the content of text files or provide base64-encoded image data.
› Inherits: | ByteArray |
---|
Properties¶
error¶
This property holds the most recently occurred error or Resource.NoError if no error occurred. If the same error occurs multiple times this property does not change. Use the errorOccurred() signal to detect multiple occurrences of the same error.
› Type: | Error |
---|---|
› Signal: | errorChanged() |
› Attributes: | Readonly |
errorString¶
This property holds the current human readable error string corresponding to the current value in the error property. It may include additional information such as failure reasons or locations.
› Type: | String |
---|---|
› Signal: | errorStringChanged() |
› Attributes: | Readonly |
Signals¶
Enumerations¶
Error¶
This enumeration describes all errors which can occur in Resource objects. The most recently occurred error is stored in the error property.
Name | Value | Description |
---|---|---|
Resource.NoError |
0 |
No error occurred or was detected. |
Resource.FileNotFoundError |
1 |
Resource file not found. |
Resource.FileOpenError |
2 |
File can’t be opened for reading. |
Resource.FileTooBigError |
3 |
File size exceeds internal limits. |