Skip to content

@xtandard/links/storage/file

File-system storage: createFileStorage() persists each key as a JSON file under a base directory. Zero dependencies; Bun and Node.

import { … } from "@xtandard/links/storage/file";
Name Summary
createFileStorage Create a file-backed storage. Values are serialized as JSON. watch is implemented via fs.watch on the base directory (recursive); it is best-effort and may coalesce or miss events on platforms without recursive-watch support.
Name Summary
FileLinksStorage A watchable, compare-and-swap capable file-backed storage.
FileStorageOptions Options for createFileStorage. legacy defaults to "ignore": every links release already wrote the encoded layout, so there is no older layout to read.