sandboxed-fs

0.3.2 • Public • Published

sandboxedFs

npm version Build Status NPM Downloads/Month NPM Downloads

sandboxedFs is a sandboxed wrapper for Node.js file system module implementing the same API but bound to a certain directory, reliably locked in it.

Usage

  • Install: npm install sandboxed-fs
  • Require: const fs = require('sandboxed-fs').bind(path);

Examples:

const fs = require('sandboxed-fs').bind(path);
 
fs.readFile('file.ext', (err, data) => {
  if (err) return console.log('Cannot read file');
});
 
fs.readFile('../../file.ext', (err, data) => {
  if (err) return console.log('Cannot read file');
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.22latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.22
0.3.11
0.3.00
0.2.00
0.1.00
0.0.10

Package Sidebar

Install

npm i sandboxed-fs

Weekly Downloads

3

Version

0.3.2

License

MIT

Unpacked Size

14.2 kB

Total Files

9

Last publish

Collaborators

  • aqrln
  • belochub
  • nechaido
  • timur.shemsedinov