createFileStorage
function createFileStorage(options): FileKvStorage;Defined in: src/storage/file.ts:227
Create a file-backed FileKvStorage. Values are pretty-printed JSON. watch uses a
recursive fs.watch on the base directory; it is best-effort and may coalesce or miss events on
platforms without recursive-watch support. A rename event is reported as remove only when the
file is actually gone.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
FileStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createFileStorage } from "@xtandard/kit/storage/file";
const storage = createFileStorage({ dir: "./data" });