You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile interface provides tools to deal with a given file with all the necessary locks.
FileHandleobject from which the lock was opened.
- The mode for accessing the file; can be
- A flag indicating if the file can be accessed (
true) or not (
- The position of the reading/writing pointer within the file.
completeevent is triggered each time a read or write operation is successful.
abortevent is triggered each time the
abort()method is called.
errorevent is triggered each time something goes wrong.
- Allows to retrieve the file metadata (size and date of the last modification). Returns a
- Allows to retrieve a part of the content of the file as an
ArrayBuffer. Returns a
- Allows to retrieve a part of the content of the file as a string. Returns a
- Allows to write some data in the file starting at the
locationoffset. Returns a
- Allows to write some data at the end of the file. Returns a
- Allows to truncate the file's content. Returns a
- Allows to guarantee that any buffered data has been transferred to disk.
- Makes the
LockedFileinactive and cancels all ongoing operations.
|FileSystem API||Editor's Draft||Draft proposal.|