import type { NodesetImageStore } from "../dist/api/index.js"; export interface FileNodesetImageStoreOptions { /** * the directory; defaults to `NODE_OPCUA_NODESET_IMAGE_DIR`, then * `$XDG_CACHE_HOME/node-opcua/nodeset-images`, then `~/.cache/node-opcua/nodeset-images` */ directory?: string; /** the size the store stays under, oldest images dropped first @default 256 MiB */ maxBytes?: number; } /** the default directory: per user, never the shared temp root, since a server trusts what it reads here */ export declare function defaultNodesetImageDirectory(): string; /** * the images in a directory of the user's, one file per key, written atomically; a corrupt or * foreign file is the loader's to detect and this store's to replace; the store stays under a * size by dropping the least recently written images */ export declare class FileNodesetImageStore implements NodesetImageStore { readonly directory: string; private readonly maxBytes; constructor(options?: FileNodesetImageStoreOptions); private fileOf; get(key: string): Promise; put(key: string, image: Uint8Array): Promise; /** drop the oldest images until the directory fits, never the one just written */ private evict; /** the keys the directory holds */ keys(): Promise; }