import { FileNode } from '../../../types'; import { RecycleBinItem, Storage } from '../../../utils/storage'; /** * Load the user's persisted world on top of the default filesystem. * * Order matters: clone defaults -> apply deletion tombstones -> re-create * user nodes shallow-first (folders before their files) -> hydrate file * contents from IndexedDB -> restore the recycle bin. */ export declare const loadPersistedFileSystem: (storage: Storage, defaultFileSystem: { root: FileNode; }) => Promise<{ root: FileNode; recycleBinRef: Record; }>; export interface PersistOptions { /** * The pristine default filesystem (before user mutations). Used to diff the * current tree: nodes missing from the default are persisted as user nodes, * default nodes missing from the current tree become deletion tombstones. */ defaultFs?: { root: FileNode; }; /** * Content paths touched by the triggering operation. When provided, only * these files are written to IndexedDB instead of rewriting every file on * every operation (#81). Metadata (cheap, localStorage) is always refreshed. */ dirtyContentPaths?: string[][]; /** Content paths whose IndexedDB entries should be removed. */ removedContentPaths?: string[][]; } export declare const persistFs: (storage: Storage, newFs: { root: FileNode; }, isLoaded: boolean, options?: PersistOptions) => Promise; export type { RecycleBinItem };