0.0.4 • Published 3 years ago
@storage-box/fs v0.0.4
Node.js fs driver for Storage Box
Installation
npm i @storage-box/fs
If you using Yarn:
yarn add @storage-box/fs
Usage
The register
default storage file to [CWD]/.storage-box
directory.
import { StorageBox } from "storage-box";
import { register } from "@storage-box/fs";
// Usge Storage static method
StorageBox.reguster("fs", register);
// Or use StorageBox instance register in box.
const box = new StorageBox("My Box");
box.register("fs", register);
Configuration
Custom cache file directory:
import { StorageBox } from "storage-box";
import { directory } from "@storage-box/fs";
StorageBox.reguster("fs", directory("custom-cache-dir"));
License
BSD 3-Clause License.
Copyright (c) 2021, Odroe, Inc. All rights reserved.
0.0.4
3 years ago