A filesystem storage implementation.
For further insights, read on.
To install this library use your favorite package manager. No additional steps are required to start using the library.
npm install @n7e/storage-fs
This library is implemented in TypeScript but can be used with JavaScript without any additional steps.
To create a filesystem storage client use the provided StorageClientBuilder
implementation:
import { FilesystemStorageClientBuilder } from "@n7e/storage-fs";
const storageClientBuilder = new FilesystemStorageClientBuilder();
The builder allows us to configure a root directory:
import { resolve } from "node:path";
storageClientBuilder.withRootDirectory(resolve(process.cwd(), "storage"));
When configured, build a storage client instance:
const storageClient = storageClientBuilder.build();