private static File checkFile(File tsFile,String fileType) throws TypeScriptException {
  if (tsFile == null) {
    throw new TypeScriptException("[" + fileType + "] file cannot be null");
  }
  if (!tsFile.exists()) {
    throw new TypeScriptException("Cannot find [" + fileType + "] file "+ FileUtils.getPath(tsFile));
  }
  if (!tsFile.isFile()) {
    throw new TypeScriptException("[" + fileType + "] "+ FileUtils.getPath(tsFile)+ " is not a file.");
  }
  return tsFile;
}

private static File checkFile ( File tsFile , String fileType ) throws TypeScriptException { if ( tsFile == null ) { throw new TypeScriptException ( "[" + fileType + "] file cannot be null" ) ; } if ( ! tsFile . exists ( ) ) { throw new TypeScriptException ( "Cannot find [" + fileType + "] file " + FileUtils . getPath ( tsFile ) ) ; } if ( ! tsFile . isFile ( ) ) { throw new TypeScriptException ( "[" + fileType + "] " + FileUtils . getPath ( tsFile ) + " is not a file." ) ; } return tsFile ; }
check if the given tsserver , tsc , etc file is a valid file .
