Here you can find the source of fileExists(String path)
public static boolean fileExists(String path)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static boolean fileExists(String path) { if (path == null) { return false; } else {/*w ww .j a v a 2 s . com*/ File file = new File(path); return file.exists(); } } }