Host · interface

OpenedFile

Choosing a file, and writing one out.

Explained in Display and the host.

interface OpenedFile
import type { OpenedFile } from '@driftengine/core';

In depth

Nothing in a game needs this; an editor does, which is why it is a separate capability rather than a member of a larger one — a consumer that never opens a file never has to supply it. AGENTS.md calls this the SDF-text shape: opt-in costs a consumer nothing until asked for.

A cancel and an absent API are different answers. Cancel is null, because a person changing their mind is ordinary. No picker at all throws, because that is a boot-time capability failure and the caller should say so rather than show an empty screen.

Properties

NameTypeDescription
namereadonlystring
bytesreadonlyUint8Array