---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/storage/opfs/interfaces/OpfsFileHandle.md
description: >-
  Minimal subset of the [File System
  Access](https://developer.mozilla.org/docs/Web/API/File_System_API)
  `OpfsFileHandle` interface that this module touches at runtime. Structurally
  compatible with the DOM-lib `OpfsFileHandle` — at call sites you pass real
  OPFS handles directly.
---

# Interface: OpfsFileHandle

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

Minimal subset of the
[File System Access](https://developer.mozilla.org/docs/Web/API/File_System_API)
`OpfsFileHandle` interface that this module touches at runtime. Structurally compatible
with the DOM-lib `OpfsFileHandle` — at call sites you pass real OPFS handles directly.

## Properties

| Property                          | Modifier   | Type     | Defined in                                                                                                                    |
| --------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
|  `kind` | `readonly` | `"file"` | [batteries/storage/opfs/index.ts:66](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L66) |
|  `name` | `readonly` | `string` | [batteries/storage/opfs/index.ts:67](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/storage/opfs/index.ts#L67) |

## Methods

### createWritable()

```ts
createWritable(): Promise<OpfsWritableFileStream>;
```

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

#### Returns

`Promise`<[`OpfsWritableFileStream`](OpfsWritableFileStream.md)>

***

### getFile()

```ts
getFile(): Promise<OpfsFile>;
```

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

#### Returns

`Promise`<[`OpfsFile`](OpfsFile.md)>
