UNPKG

@bitblit/asyncglk

Version:
21 lines (20 loc) 1.05 kB
import type { ProgressCallback } from '../../common/file.js'; import { NullProvider } from './common.js'; import type { DownloadOptions, Provider } from './interface.js'; export declare class DownloadProvider implements Provider { browseable: boolean; next: NullProvider; private options; private store; constructor(options: DownloadOptions); download(url: string, progress_callback?: ProgressCallback): Promise<string>; upload(file: File): Promise<string>; delete(path: string): Promise<void>; exists(path: string): Promise<boolean | null>; read(path: string): Promise<Uint8Array | null>; write(files: Record<string, Uint8Array>): Promise<void>; } /** Fetch a storyfile, using the proxy if necessary, and handling JSified stories */ export declare function fetch_storyfile(options: DownloadOptions, url: string, progress_callback?: ProgressCallback): Promise<Uint8Array>; /** Read an uploaded file and return it as a Uint8Array */ export declare function read_uploaded_file(file: File): Promise<Uint8Array>;