docs: function detect(file, opts, cb) {
    if (typeof file !== 'object') {
      throw new TypeError('file should be an object');
    }
    if (typeof file.path !== 'string') {
      throw new TypeError('file.path should be a string.');
    }
  
    if (!file.contents && file.content) {
      file.contents = file.content;
    }
  
    if (!file.contents) {
      throw new TypeError('file.contents must be defined to do a comparison.');
    }
  
    if (typeof opts === 'function') {
      cb = opts;
      opts = {};
    }
  
    opts = opts || {};
    var silent = opts.silent;
    var fp = path.relative(process.cwd(), file.path);
    if (!fs.existsSync(fp)) {
      return cb('create');
    }
  
    if (opts.force) {
      if (!silent) {
        msg = utils.green(utils.success) + ' file written to';
        console.log(msg, utils.green(fp));
      }
      return cb('force');
    }
  
    opts.existing = opts.existing || fs.readFileSync(fp, 'utf8');
    if (opts.existing !== file.contents) {
      if (!silent) {
        var msg = utils.yellow(utils.warning) + '  conflict detected:';
        console.log(msg, utils.yellow(fp));
      }
      if (opts.ask === false) {
        return cb('conflict');
      }
      return ask(file, opts, cb);
    }
  
    if (!silent) {
      var msg = 'File not written, identical contents to:';
      console.log(msg, utils.cyan(fp));
    }
    return cb('identical');
  }