import"FileManagerPlugin.idl";
|
String | readFile ([in] String path, [in] Integer position, [in] Integer chunk_length) |
|
enumerations | writeFile ([in] String data, [in] String path, [in] Integer position, [in] enumerations mode, [in] Integer offset, [in] Integer chunk_length) |
|
This is a class which implements global FileManager.
String FileManager.readFile |
( |
[in] String |
path, |
|
|
[in] Integer |
position, |
|
|
[in] Integer |
chunk_length |
|
) |
| |
Read data from file.
- Parameters
-
path | Path of file. Throws exception if path is not a removable device path. |
position | Starting position to read. |
chunk_length | Number of bytes to read. |
- Returns
- Data read from file, or empty string in case of error.
enumerations FileManager.writeFile |
( |
[in] String |
data, |
|
|
[in] String |
path, |
|
|
[in] Integer |
position, |
|
|
[in] enumerations |
mode, |
|
|
[in] Integer |
offset, |
|
|
[in] Integer |
chunk_length |
|
) |
| |
Write data to file.
- Parameters
-
data | Data to be written. |
path | Path of file. If path is not a removable device path, FileManager.PERMISSION_DENIED error is returned. |
position | Starting position for writing. Only valid if mode is set to FileManager.FILE_WRITE_MODE_POSITION. |
mode | Writing mode. |
offset | Offset of data to be written. |
chunk_length | Number of bytes to write. If chunk_length is greater than data byte length, it is set to data byte length. If offset+chunk_length is greater than data byte length, it is set to data_byte_length - offset. |
- Returns
- Result of write operation.
const Integer FileManager.BAD_PARAMETER = 7 |
An invalid parameter was passed to the function.
const Integer FileManager.DISK_FULL = 8 |
The relevant disk is full.
const Integer FileManager.END_OF_DATA = 3 |
const Integer FileManager.FILE_NOT_FOUND = 1 |
An invalid parameter was passed to the function.
const Integer FileManager.FILE_OPEN_ERROR = 2 |
Error attempting to open or create a file.
const Integer FileManager.FILE_READ_ERROR = 4 |
Error occurred while reading data from file.
const Integer FileManager.FILE_WRITE_ERROR = 5 |
Error occurred while writing data to file.
const Integer FileManager.FILE_WRITE_MODE_APPEND = 1 |
Append data to end of file. If file does not exists, first creates the file.
const Integer FileManager.FILE_WRITE_MODE_POSITION = 2 |
Write data to file starting from given position. File must exists.
const Integer FileManager.FILE_WRITE_MODE_TRUNCATE = 0 |
Override existing data. If file does not exists, first creates the file. Default mode.
const Integer FileManager.MEMORY_ALLOC_FAIL = 6 |
Unable to allocate memory within the implementation of a function.
const Integer FileManager.NO_ERROR = 0 |
Operation completed successfully.
const Integer FileManager.OPERATION_FAIL = 10 |
An unspecified error occurred.
const Integer FileManager.PERMISSION_DENIED = 9 |
Attempt to access a file or folder at invalid removable device path.
The documentation for this interface was generated from the following file: