lib/plugins/XMLHttpRequestPlugin.js
function readFileSync (args) {
    var file = args.file;
    var config = args.config;
    var error, response;

    safeCall(sendRequest, false, file.url, config, function handleResponse (err, res) {
      error = err;
      response = res;
    });

    if (error) {
      throw error;
    }
    else {
      setHttpMetadata(file, response);
      return response.data;
    }
  }
function readFileSync (args) {
    var file = args.file;
    var config = args.config;
    var error, response;

    safeCall(sendRequest, false, file.url, config, function handleResponse (err, res) {
      error = err;
      response = res;
    });

    if (error) {
      throw error;
    }
    else {
      setHttpMetadata(file, response);
      return response.data;
    }
  }
function readFileSync ( args ) { var file = args . file ; var config = args . config ; var error , response ; safeCall ( sendRequest , false , file . url , config , function handleResponse ( err , res ) { error = err ; response = res ; } ) ; if ( error ) { throw error ; } else { setHttpMetadata ( file , response ) ; return response . data ; } }
Synchronously downlaods a file.

@param {File} args.file - The {@link File} to read
@param {function} args.next - Calls the next plugin, if the file is not a local filesystem file
Synchronously downlaods a file .