---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/storage/opfs/interfaces/OpfsFile.md
description: 'Minimal subset of the DOM `File` interface used by [`OpfsSpoolReader`](https://adk.nht.io/api/@nhtio/adk/batteries/storage/opfs/classes/OpfsSpoolReader).'
---

# Interface: OpfsFile

Defined in: [batteries/storage/opfs/index.ts:111](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L111)

Minimal subset of the DOM `File` interface used by [OpfsSpoolReader](../classes/OpfsSpoolReader.md).

## Extends

* [`OpfsBlob`](OpfsBlob.md)

## Properties

| Property                          | Modifier   | Type     | Inherited from                                                | Defined in                                                                                                                      |
| --------------------------------- | ---------- | -------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|  `name` | `readonly` | `string` | -                                                             | [batteries/storage/opfs/index.ts:112](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L112) |
|  `size` | `readonly` | `number` | [`OpfsBlob`](OpfsBlob.md).[`size`](OpfsBlob.md#property-size) | [batteries/storage/opfs/index.ts:102](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L102) |

## Methods

### slice()

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

Defined in: [batteries/storage/opfs/index.ts:103](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L103)

#### Parameters

| Parameter      | Type     |
| -------------- | -------- |
| `start?`       | `number` |
| `end?`         | `number` |
| `contentType?` | `string` |

#### Returns

[`OpfsBlob`](OpfsBlob.md)

#### Inherited from

[`OpfsBlob`](OpfsBlob.md).[`slice`](OpfsBlob.md#slice)

***

### stream()

```ts
stream(): OpfsReadableStream;
```

Defined in: [batteries/storage/opfs/index.ts:105](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L105)

#### Returns

[`OpfsReadableStream`](OpfsReadableStream.md)

#### Inherited from

[`OpfsBlob`](OpfsBlob.md).[`stream`](OpfsBlob.md#stream)

***

### text()

```ts
text(): Promise<string>;
```

Defined in: [batteries/storage/opfs/index.ts:104](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L104)

#### Returns

`Promise`<`string`>

#### Inherited from

[`OpfsBlob`](OpfsBlob.md).[`text`](OpfsBlob.md#text)
