lib/cli/in.js
function(filePath, callback) {
	if (!fs.existsSync(filePath)) {
		errorHandler("File " + filePath + " does not exist. Please specify a valid path.");
	}
	var body = '';
	var reader = fs.createReadStream(filePath);
	reader.on('data', function(chunks) {
		body += chunks;
	}).on('end', function() {
		callback(body);
	}).on('error', function(e) {
		throw e;
	});
}
function(filePath, callback) {
	if (!fs.existsSync(filePath)) {
		errorHandler("File " + filePath + " does not exist. Please specify a valid path.");
	}
	var body = '';
	var reader = fs.createReadStream(filePath);
	reader.on('data', function(chunks) {
		body += chunks;
	}).on('end', function() {
		callback(body);
	}).on('error', function(e) {
		throw e;
	});
}
function ( filePath , callback ) { if ( ! fs . existsSync ( filePath ) ) { errorHandler ( "File " + filePath + " does not exist. Please specify a valid path." ) ; } var body = '' ; var reader = fs . createReadStream ( filePath ) ; reader . on ( 'data' , function ( chunks ) { body += chunks ; } ) . on ( 'end' , function ( ) { callback ( body ) ; } ) . on ( 'error' , function ( e ) { throw e ; } ) ; }
Reads the specified JSON file from the
filesystem which is used to generate
the schema.

@param {String} filePath - Path to JSON document to load.
@param {Function} callback
Reads the specified JSON file from the filesystem which is used to generate the schema .