new FileWriter(file, append)
This class writes to the mobile device file system.
For Android:
The root directory is the root of the file system.
To write to the SD card, the file name is "sdcard/my_file.txt"
Parameters:
Name | Type | Description |
---|---|---|
file |
File | File object containing file properties |
append |
if true write to the end of the file, otherwise overwrite the file |
Methods
abort()
Abort writing file.
seek(offset)
Moves the file pointer to the location specified.
If the offset is a negative number the position of the file
pointer is rewound. If the offset is greater than the file
size the position is set to the end of the file.
Parameters:
Name | Type | Description |
---|---|---|
offset |
is the location to move the file pointer to. |
truncate(size)
Truncates the file to the size specified.
Parameters:
Name | Type | Description |
---|---|---|
size |
to chop the file at. |
write(data, isPendingBlobReadResult)
Writes data to the file
Parameters:
Name | Type | Description |
---|---|---|
data |
text or blob to be written | |
isPendingBlobReadResult |
Boolean | true if the data is the pending blob read operation result |