lib/utils/file-util.js
function checkFileExistsSync(filepath){
  var flag = true;

  try {
    fs.accessSync(filepath, fs.F_OK);
  } catch(e){
    flag = false;
  }

  return flag;
}
function checkFileExistsSync(filepath){
  var flag = true;

  try {
    fs.accessSync(filepath, fs.F_OK);
  } catch(e){
    flag = false;
  }

  return flag;
}
function checkFileExistsSync ( filepath ) { var flag = true ; try { fs . accessSync ( filepath , fs . F_OK ) ; } catch ( e ) { flag = false ; } return flag ; }
Check the existence of the file
Check the existence of the file