lib/ssiparser.js
function getFile(filepath) {
	var fileObj = {
			path: filepath,
			content: null
	};
    try {
        fs.accessSync(filepath, fs.F_OK);
    } catch(e) {
			console.log(e.message);
        return fileObj;
    }
		fileObj.content = fs.readFileSync(filepath, 'utf-8').trim();
		return fileObj;
}
function getFile(filepath) {
	var fileObj = {
			path: filepath,
			content: null
	};
    try {
        fs.accessSync(filepath, fs.F_OK);
    } catch(e) {
			console.log(e.message);
        return fileObj;
    }
		fileObj.content = fs.readFileSync(filepath, 'utf-8').trim();
		return fileObj;
}
function getFile ( filepath ) { var fileObj = { path : filepath , content : null } ; try { fs . accessSync ( filepath , fs . F_OK ) ; } catch ( e ) { console . log ( e . message ) ; return fileObj ; } fileObj . content = fs . readFileSync ( filepath , 'utf-8' ) . trim ( ) ; return fileObj ; }
Helper which gets a file content
Helper which gets a file content