Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

databank-disk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

databank-disk

Databank driver for simple disk storage

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

disk driver

The disk driver provides on-disk storage of data -- one file per object.

Each databank is mapped to a directory; each type is a sub-directory of the main databank directory.

Usage

To create a disk databank, use the Databank.get() method:

var Databank = require('databank').Databank;

var db = Databank.get('disk', {dir: '/var/lib/mydatabank'});

The driver takes the following parameters:

  • schema: the database schema, as described in the Databank README.
  • dir: main directory for the databank. Default is /var/lib/diskdatabank.
  • mktmp: if truthy, dir will be ignored, and a new temporary directory under os.tmpDir() will be made. The temporary dir will be deleted when the databank is disconnected.
  • mode: creation mode for the main databank dir and its subdirs; default is 0660.
  • hashDepth: files under the type subdirs are stored according to a hash of the id; for more efficient retrieval, there are hashed subdirs under each dir. So the state object stored under BRh1Az3 will be found at <maindir>/state/B/BR/BRh/BRh1Az3.json. This value sets the number of subdirs to use.

FAQs

Package last updated on 12 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc