Skip to content
1 min read · 79 words

Interface: OpfsWritableFileStream

Defined in: src/batteries/storage/opfs/index.ts:107

Minimal subset of the DOM FileSystemWritableFileStream interface used by the OPFS battery's main-thread write path.

Methods

close()

ts
close(): Promise<void>;

Defined in: src/batteries/storage/opfs/index.ts:111

Flush and close the stream, committing the written contents.

Returns

Promise<void>


write()

ts
write(data:
  | string
  | ArrayBuffer
  | Uint8Array<ArrayBufferLike>
| ArrayBufferView<ArrayBufferLike>): Promise<void>;

Defined in: src/batteries/storage/opfs/index.ts:109

Append/write a chunk to the stream.

Parameters

ParameterType
data| string | ArrayBuffer | Uint8Array<ArrayBufferLike> | ArrayBufferView<ArrayBufferLike>

Returns

Promise<void>