/** * io/fs-mount.ts * * Broker-backed file nodes for the Emscripten FS, replacing createLazyFile's * sync-XHR/byte-at-a-time read path and WORKERFS's uncached FileReaderSync * reads. A node is created via FS.createLazyFile (never triggering its lazy * fetch), then its `contents` is swapped for a `{ length }` facade (the * non-configurable `usedBytes` getter reads it, keeping stat sizes right) * and its `stream_ops` replaced with bulk block-copy reads served by the * SyncIo channel. Nodes are read-only: created with canWrite=false and no * `write` stream op, exactly like the legacy mounts. */ import { SyncIo } from './sync-client.js'; import type { OpenSlideWasmModule, VirtualFile } from '../types.js'; /** Key under which a local File is cached broker-side; equal Files coming * from several workers (structured clones of the same pick) share it. */ export declare function fileKeyForFile(file: File): string; export declare function fileKeyForUrl(url: string): string; /** Create a read-only FS file node whose reads go through the broker. */ export declare function createBrokerFile(mod: OpenSlideWasmModule, parentPath: string, name: string, fileKey: string, size: number, io: SyncIo): void; /** Mount a remote URL through the broker. Async: stats the URL first. */ export declare function mountUrlViaBroker(mod: OpenSlideWasmModule, url: string, mountId: string, io: SyncIo): Promise<{ path: string; fileKeys: string[]; }>; /** Mount a flat list of local Files through the broker. */ export declare function mountFilesViaBroker(mod: OpenSlideWasmModule, files: File[], mountId: string, io: SyncIo): { path: string; fileKeys: string[]; }; /** * Mount a multi-file slide (MRXS/VMS/DICOM) through the broker. Unlike the * WORKERFS version there is a single MEMFS mount: plain mkdir for the tree, * one broker-backed node per file — root files need no special-casing. */ export declare function mountDirViaBroker(mod: OpenSlideWasmModule, entries: VirtualFile[], indexFile: string, mountId: string, io: SyncIo): { path: string; fileKeys: string[]; }; //# sourceMappingURL=fs-mount.d.ts.map