import type { FolderName, OpfsKey, UrlString } from './types.js'; import { type EvictionIndexEntry } from './opfsEvictionIndex.js'; export interface CacheFileEntry { key: OpfsKey; size: number; lastAccessed: number; evictable: boolean; } export interface StorageEstimate { quota: number; usage: number; } export declare function isInSkipList(url: UrlString): boolean; export declare function addToSkipList(url: UrlString): void; export declare function getStorageEstimate(): Promise; export declare function getCacheLimit(estimate: StorageEstimate): number; export declare function listCacheFilesWithMeta(dir: FileSystemDirectoryHandle): Promise; export declare function getTotalCacheSize(entries: CacheFileEntry[]): number; export declare function computeEvictionSet(entries: EvictionIndexEntry[], needToFree: number): OpfsKey[]; export declare function evictFiles(dir: FileSystemDirectoryHandle, keys: OpfsKey[]): Promise; export type EnsureSpaceResult = { ok: true; evictedKeys?: OpfsKey[]; } | { ok: false; reason: string; }; export interface EnsureSpaceOptions { folderName: FolderName; onEvicted?: (keys: OpfsKey[]) => void; excludeKeyFromEviction?: OpfsKey; } export declare function ensureSpaceForWrite(dir: FileSystemDirectoryHandle, newFileSize: number, options: EnsureSpaceOptions): Promise;