Skip to content
1 min read · 177 words

Interface: OpfsFile ​

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

Minimal subset of the DOM File interface used by OpfsSpoolReader.

Extends ​

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
namereadonlystringThe file's name.-src/batteries/storage/opfs/index.ts:135
sizereadonlynumberByte length of the blob.OpfsBlob.sizesrc/batteries/storage/opfs/index.ts:121

Methods ​

slice() ​

ts
slice(
   start?: number,
   end?: number,
   contentType?: string): OpfsBlob;

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

Return a sub-range of the blob as a new blob.

Parameters ​

ParameterType
start?number
end?number
contentType?string

Returns ​

OpfsBlob

Inherited from ​

OpfsBlob.slice


stream() ​

ts
stream(): OpfsReadableStream;

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

Open a readable byte stream over the blob.

Returns ​

OpfsReadableStream

Inherited from ​

OpfsBlob.stream


text() ​

ts
text(): Promise<string>;

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

Read the blob's contents as text.

Returns ​

Promise<string>

Inherited from ​

OpfsBlob.text