lib/fs-utils.js
function forceCopy(fs, oldPath, newPath, callback) {
  fs.unlink(newPath, function(err) {
    if(err && err.code !== 'ENOENT') {
      return callback(err);
    }

    fs.readFile(oldPath, function(err, buf) {
      if(err) {
        return callback(err);
      }

      fs.writeFile(newPath, buf, callback);
    });
  });
}
function forceCopy(fs, oldPath, newPath, callback) {
  fs.unlink(newPath, function(err) {
    if(err && err.code !== 'ENOENT') {
      return callback(err);
    }

    fs.readFile(oldPath, function(err, buf) {
      if(err) {
        return callback(err);
      }

      fs.writeFile(newPath, buf, callback);
    });
  });
}
function forceCopy ( fs , oldPath , newPath , callback ) { fs . unlink ( newPath , function ( err ) { if ( err && err . code !== 'ENOENT' ) { return callback ( err ) ; } fs . readFile ( oldPath , function ( err , buf ) { if ( err ) { return callback ( err ) ; } fs . writeFile ( newPath , buf , callback ) ; } ) ; } ) ; }
copy oldPath to newPath, deleting newPath if it exists
copy oldPath to newPath deleting newPath if it exists