public static boolean fileExists(String file){
  File tmp=new File(file);
  return (tmp.isFile() && tmp.exists());
}

public static boolean fileExists ( String file ) { File tmp = new File ( file ) ; return ( tmp . isFile ( ) && tmp . exists ( ) ) ; }
checks if the file exists
