sudo-fs-promise

1.0.1 • Public • Published

sudo-fs-promise

Simple promise wrapper for @mh-cbon/sudo-fs . Currently 1.0.17.

NPM Version NPM Downloads

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install sudo-fs-promise --save

Example

var fs = require("sudo-fs-promise");

fs.readFile("./someFile")
.then(data => { console.log("data:", data); })
.catch(err => { console.log("err:", err); });

API

fs.createReadStream(fPath) .then(...)
fs.createWriteStream(fPath) .then(...)
fs.readFile(fPath, options) .then(...)
fs.writeFile(fPath, content, options) .then(...)
fs.touch(fPath, options) .then(...)
fs.unlink(fPath) .then(...)
fs.rmdir(fPath) .then(...)
fs.mkdir(fPath, mod) .then(...)
fs.chown(fPath, uid, gid) .then(...)
fs.chmod(fPath, mod) .then(...)
fs.exists(fPath) .then(...)

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i sudo-fs-promise

Weekly Downloads

7

Version

1.0.1

License

ISC

Last publish

Collaborators

  • wormss