index.js
function deleteFile(filePath) {
  return new Promise((resolve, reject) => {
    fs.unlink(filePath, (err) => {
      if (err) {
        reject(err);
        return;
      }
      resolve(filePath);
    });
  });
}
function deleteFile(filePath) {
  return new Promise((resolve, reject) => {
    fs.unlink(filePath, (err) => {
      if (err) {
        reject(err);
        return;
      }
      resolve(filePath);
    });
  });
}
function deleteFile ( filePath ) { return new Promise ( ( resolve , reject ) => { fs . unlink ( filePath , ( err ) => { if ( err ) { reject ( err ) ; return ; } resolve ( filePath ) ; } ) ; } ) ; }
Delete a file from the file system
@param {string} filePath path and filename: the file to delete
@returns {Promise<string>} resolve with the filePath deleted
Delete a file from the file system