Host · interface

FileDialogs

Explained in Display and the host.

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

Methods

openFile

openFile(accept: readonly string[]): Promise<OpenedFile | null>

null when the person cancelled. Throws when the platform has no picker.

ParameterTypeDescription
acceptreadonly string[]

saveFile

saveFile(name: string, bytes: Uint8Array): Promise<boolean>

false when the person cancelled. Throws when the platform has no picker.

ParameterTypeDescription
namestring
bytesUint8Array