The promise-based alternative for the node.js fs module
The promise-based alternative for the node.js fs module.
This module provides the file operations based on the promise pattern. All operations are the same as the node.js fs module but the results are presented as promises.
For example pfs.readFile equals to fs.readFile but uses not a callback based asyncronious but the promise based one.
var pfs = require"pfs";var filePromise = pfsreadFile"./StorageEditor/BlockEditor.html";filePromisethenconsole.logdatatoString;catchconsole.logerror;;