services/disk.js
// Reads a file. Wraps fs.readFile into a native promise
Reads a file. Wraps fs.readFile into a native promise
Reads a file . Wraps fs . readFile into a native promise
function readFile(filePath, encoding) {
  return new Promise((resolve, reject) => fs.readFile(filePath, encoding, (err, str) => {
    if (err) {
      reject(err);
    } else {
      resolve(str);
    }
  }));
}
function readFile ( filePath , encoding ) { return new Promise ( ( resolve , reject ) => fs . readFile ( filePath , encoding , ( err , str ) => { if ( err ) { reject ( err ) ; } else { resolve ( str ) ; } } ) ) ; }
Reads a file.
Reads a file .