Here you can find the source of FileExists(String file)
public static boolean FileExists(String file)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean FileExists(String file) { boolean fileExists = false; try {/*from w w w. j a v a 2 s. co m*/ File f = new File(file); fileExists = f.exists(); } catch (Exception e) { // eat exception } return fileExists; } }