function readFile (file, options) {
return new Promise(function (resolve, reject) {
  debug('Reading %s', file.url);

  // Find the resolvers that can read this file
  var resolvers = plugins.all(options.resolve);
  resolvers = plugins.filter(resolvers, 'canRead', file);

  // Run the resolvers, in order, until one of them succeeds
  plugins.sort(resolvers);
  plugins.run(resolvers, 'read', file)
    .then(resolve, onError);

  function onError (err) {
    // Throw the original error, if it's one of our own (user-friendly) errors.
    // Otherwise, throw a generic, friendly error.
    if (err && !(err instanceof SyntaxError)) {
      reject(err);
    }
    else {
      reject(ono.syntax('Unable to resolve $ref pointer "%s"', file.url));
    }
  }
});
}
Reads the given file, using the configured resolver plugins

@param {object} file           - An object containing information about the referenced file
@param {string} file.url       - The full URL of the referenced file
@param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
@param {$RefParserOptions} options

@returns {Promise}
The promise resolves with the raw file contents and the resolver that was used.