createFileStorage
function createFileStorage(options): FileLinksStorage;Defined in: src/storage/file.ts:50
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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
FileStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createFileStorage } from "@xtandard/links/storage/file";
const storage = createFileStorage({ dir: "./data/links" });