lib/io.js
function validateFileSync(path, errorMessage) {
  errorMessage = errorMessage || 'Error validateFileSync() the file path is not valid ' + path;
  var isValid = existsFileSync(path);
  if (!isValid) {
    console.error(errorMessage);
  }
  return isValid;
}
function validateFileSync(path, errorMessage) {
  errorMessage = errorMessage || 'Error validateFileSync() the file path is not valid ' + path;
  var isValid = existsFileSync(path);
  if (!isValid) {
    console.error(errorMessage);
  }
  return isValid;
}
function validateFileSync ( path , errorMessage ) { errorMessage = errorMessage || 'Error validateFileSync() the file path is not valid ' + path ; var isValid = existsFileSync ( path ) ; if ( ! isValid ) { console . error ( errorMessage ) ; } return isValid ; }
Validate if a given path has a valid file, is it doesn't console.error with an optional custom message.
@param path
@param errorMessage
@returns {Boolean}
Validate if a given path has a valid file is it doesn t console . error with an optional custom message .