code: function copydirSync(from, to, options) {
    if (typeof options === 'function') {
      options = {
        filter: options
      };
    }
    if(typeof options.cover === 'undefined') {
      options.cover = true;
    }
    options.filter = typeof options.filter === 'function' ? options.filter : function(state, filepath, filename) {
      return options.filter;
    };
    var stats = fs.lstatSync(from);
    var statsname = stats.isDirectory() ? 'directory' :
      stats.isFile() ? 'file' :
      stats.isSymbolicLink() ? 'symbolicLink' :
      '';
    var valid = options.filter(statsname, from, path.dirname(from), path.basename(from));
    if (statsname === 'directory' || statsname === 'symbolicLink') {
      // Directory or SymbolicLink
      if(valid) {
        try {
          fs.statSync(to);
        } catch(err) {
          if(err.code === 'ENOENT') {
            fs.mkdirSync(to);
            options.debug && console.log('>> ' + to);
          } else {
            throw err;
          }
        }
        rewriteSync(to, options, stats);
        listDirectorySync(from, to, options);
      }
    } else if(stats.isFile()) {
      // File
      if(valid) {
        if(options.cover) {
          writeFileSync(from, to, options, stats);
        } else {
          try {
            fs.statSync(to);
          } catch(err) {
            if(err.code === 'ENOENT') {
              writeFileSync(from, to, options, stats);
            } else {
              throw err;
            }
          }
        }
      }
    } else {
      throw new Error('stats invalid: '+ from);
    }
  }
docs: /*
  options: {
  utimes: false,  // Boolean | Object, keep utimes if true
  mode: false,    // Boolean | Number, keep file mode if true
  cover: true,    // Boolean, cover if file exists
  filter: true,   // Boolean | Function, file filter
  }