services/disk.js
// This is _not_ concurrency safe, so don't export it without making it like writeJsonFile
This is _not_ concurrency safe, so don't export it without making it like writeJsonFile
This is _not_ concurrency safe so don ' t export it without making it like writeJsonFile
function writeFile(filePath, data, encoding) {
  return new Promise((resolve, reject) => fs.writeFile(filePath, data, encoding, err => {
    if (err) {
      reject(err);
    } else {
      resolve();
    }
  }));
}
function writeFile ( filePath , data , encoding ) { return new Promise ( ( resolve , reject ) => fs . writeFile ( filePath , data , encoding , err => { if ( err ) { reject ( err ) ; } else { resolve ( ) ; } } ) ) ; }
This is _not_ concurrency safe, so don't export it without making it like writeJsonFile
This is _not_ concurrency safe so don ' t export it without making it like writeJsonFile