API Reference
fileBackend()
Node filesystem byte backend with atomic replace writes and D85 conditional create.
Import
import { fileBackend } from "@graphrefly/ts/storage/node";
Signature
function fileBackend(
dir: string,
opts: FileBackendOptions = {},
): StorageBackend
Parameters
| Parameter | Type | Description |
|---|---|---|
dir | string | dir value used by the helper. |
opts | FileBackendOptions | Options that configure the helper. |
Returns
A StorageBackend value.
Example
import { fileBackend } from "@graphrefly/ts/storage/node";
Source
packages/ts/src/storage/node.ts