No Password Management

    nodestream-filesystem

    0.7.0 • Public • Published

    Filesystem nodestream-filesystem

    NPM Version Build Status Coverage Status Documentation Status Built with GNU Make

    Local filesystem adapter for Nodestream

    Identity: filesystem

    API docs

    Description

    This adapter provides interface for Nodestream to transfer bytes between your app and the local filesystem storage on which the app runs.

    Usage

    Installation

    npm install --save nodestream-filesystem

    Configuration

    This adapter has only one confuguration option - root - a path to a folder where Nodestream should expect to find/write your files to. If you do not provide this option, then Nodestream will try its best to determine that path for you:

    • By checking the presence of require.main and using it
    • By using the current working directory

    In all these default cases, the target folder will be named .storage. If it does not exist, it will be created on first write.

    Even with these defaults, you should always explicitly state where Nodestream should put your files. It's the only way to guarantee that you will not spend hours searching through your project's files trying to figure out where the hell did that file go. 😀

    const Nodestream = require('nodestream')
    const nodestream = new Nodestream({
      adapter: 'filesystem',
      config: {
        // You MUST provide either an absolute path or nothing at all
        // You can use array notation, the parts will be `path.join()`ed for you
        root: [__dirname, '.storage']
      }
    })

    License

    This software is licensed under the BSD-3-Clause License. See the LICENSE file for more information.

    Install

    npm i nodestream-filesystem

    DownloadsWeekly Downloads

    12

    Version

    0.7.0

    License

    BSD-3-Clause

    Last publish

    Collaborators

    • dreamscapes