cp.js
function(checks, callback) {
      fs.lstat(options.source, function(err, stats) {
        /* istanbul ignore else  */
        if (stats.isFile()) {
          copyFile(options, callback);
        } else if (stats.isDirectory()) {
          copyDir(options, callback);
        } else if (stats.isSymbolicLink()) {
          copySymlink(options, callback);
        } else {
          callback(new Error('Unsupported file type !'));
        }
      });
    }
function(checks, callback) {
      fs.lstat(options.source, function(err, stats) {
        /* istanbul ignore else  */
        if (stats.isFile()) {
          copyFile(options, callback);
        } else if (stats.isDirectory()) {
          copyDir(options, callback);
        } else if (stats.isSymbolicLink()) {
          copySymlink(options, callback);
        } else {
          callback(new Error('Unsupported file type !'));
        }
      });
    }
function ( checks , callback ) { fs . lstat ( options . source , function ( err , stats ) { /* istanbul ignore else  */ if ( stats . isFile ( ) ) { copyFile ( options , callback ) ; } else if ( stats . isDirectory ( ) ) { copyDir ( options , callback ) ; } else if ( stats . isSymbolicLink ( ) ) { copySymlink ( options , callback ) ; } else { callback ( new Error ( 'Unsupported file type !' ) ) ; } } ) ; }
Read the source and acts accordingly to its type
Read the source and acts accordingly to its type