export interface OpfsSyncAccessHandle { read(buffer: Uint8Array, options?: { at?: number; }): number; write(buffer: Uint8Array, options?: { at?: number; }): number; truncate(size: number): void; flush(): void; close(): void; getSize(): number; } /** * Streams large assets into OPFS and exposes both sync access handles for the * model load path and File objects for incidental reads (projector, metadata * detection). The model load path mounts shards via the * SyncAccessHandleFS provider in `wasm/sync-access-handle-fs.ts`. */ export declare class FileSystemStorage { private root; private readonly rootPath; constructor(storageRoot?: string); /** * Check if OPFS is supported in the current environment. */ static isSupported(): boolean; static isSyncAccessSupported(): Promise; private ensureRoot; private getDirectory; private getFileHandleAt; private isNotFoundError; private toWritableFileSink; private createSyncWritableFileSink; /** * Get a File handle for an existing file in storage. */ getFile(fileName: string): Promise; listFileNames(): Promise; listFileNamesAt(path: readonly string[]): Promise; createSyncAccessHandle(fileName: string, options?: { create?: boolean; }): Promise; readText(fileName: string): Promise; readTextAt(path: readonly string[]): Promise; writeText(fileName: string, contents: string): Promise; writeTextAt(path: readonly string[], contents: string): Promise; /** * Stream a web response body directly to OPFS. */ streamToDisk(fileName: string, stream: ReadableStream, onProgress?: (bytes: number) => void, signal?: AbortSignal): Promise; /** * Delete a file from storage. */ deleteFile(fileName: string): Promise; deleteFileAt(path: readonly string[]): Promise; }