GraphReFlyTS

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

ParameterTypeDescription
dirstringdir value used by the helper.
optsFileBackendOptionsOptions that configure the helper.

Returns

A StorageBackend value.

Example

import { fileBackend } from "@graphrefly/ts/storage/node";

Source

packages/ts/src/storage/node.ts