Here you can find the source of fileExists(String absolutePathAndFileName)
public static Boolean fileExists(String absolutePathAndFileName)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static Boolean fileExists(String absolutePathAndFileName) { File f = new File(absolutePathAndFileName); if (f.exists() && !f.isDirectory()) { return true; } else {// ww w. ja v a 2 s.c om return false; } } }