HTML and CSS Reference
In-Depth Information
ject can perform multiple write actions, rather than just saving a single
Blob
.
Table B.34. FileWriter API
Attribute/method
Description
seek(offset)
Sets a specific file location at which the next write will occur.
truncate(size)
Alters the length of the file to the size passed in bytes.
write(data)
Writes the input data to a Blob object.
write a
Blob
object to a file.
Table B.35. FileSaver API
Constructor/attribute/
method
Description
FileSaver(data)
Creates a FileSaver object with Blob data.
abort()
Terminates file saving.
monitor the progress of writing a
Blob
to a file.
Table B.36.
FileSaver
events
Event name
Description
writestart
Fires when starting a writing event.
progress
Fires repeatedly while file is being written.
write
Fires when a file is being written to.
abort
Fires when file writing is canceled.
error
Fires in response to an error or an abort.
writeend
Fires when writing to a file has ended.
ject has methods to write and inspect the state of a file.