FileSystemWritableFileStream

The FileSystemWritableFileStream interface of the File System API is a WritableStream object with additional convenience methods, which operates on a single file on disk. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun abort(reason: JsError?)
Link copied to clipboard
fun abortAsync(reason: JsError?): Promise<Void>
Link copied to clipboard
suspend fun close()
Link copied to clipboard
Link copied to clipboard
suspend fun seek(position: UInt53)

The seek() method of the FileSystemWritableFileStream interface updates the current file cursor offset to the position (in bytes) specified when calling the method.

Link copied to clipboard
fun seekAsync(position: UInt53): Promise<Void>
Link copied to clipboard
suspend fun truncate(size: UInt53)

The truncate() method of the FileSystemWritableFileStream interface resizes the file associated with the stream to the specified size in bytes.

Link copied to clipboard
Link copied to clipboard
suspend fun write(data: FileSystemWriteChunkType)

The write() method of the FileSystemWritableFileStream interface writes content into the file the method is called on, at the current file cursor offset.

Link copied to clipboard